Initialization of some variables on gutenberg blocks.
This commit is contained in:
parent
219fcff480
commit
bc1e889d43
|
@ -380,7 +380,7 @@ registerBlockType('tainacan/facets-list', {
|
|||
<div>
|
||||
<RangeControl
|
||||
label={__('Maximum number of facets', 'tainacan')}
|
||||
value={ maxFacetsNumber }
|
||||
value={ maxFacetsNumber ? maxFacetsNumber : 12}
|
||||
onChange={ ( aMaxFacetsNumber ) => {
|
||||
maxFacetsNumber = aMaxFacetsNumber;
|
||||
setAttributes( { maxFacetsNumber: aMaxFacetsNumber } )
|
||||
|
|
|
@ -428,7 +428,7 @@ registerBlockType('tainacan/dynamic-items-list', {
|
|||
<div>
|
||||
<RangeControl
|
||||
label={__('Maximum number of items', 'tainacan')}
|
||||
value={ maxItemsNumber }
|
||||
value={ maxItemsNumber ? maxItemsNumber : 12 }
|
||||
onChange={ ( aMaxItemsNumber ) => {
|
||||
maxItemsNumber = aMaxItemsNumber;
|
||||
setAttributes( { maxItemsNumber: aMaxItemsNumber } )
|
||||
|
|
Loading…
Reference in New Issue