A bit more checking for maxItemsNumber

This commit is contained in:
mateuswetah 2022-06-01 16:53:31 -03:00
parent 9ecf899a86
commit 082be875ca
1 changed files with 4 additions and 0 deletions

View File

@ -62,6 +62,10 @@ export default function({ attributes, setAttributes, className, isSelected, clie
maxColumnsCount = 5;
setAttributes({ maxColumnsCount: maxColumnsCount });
}
if (maxItemsNumber === undefined) {
maxItemsNumber = 12;
setAttributes({ maxItemsNumber: maxItemsNumber });
}
if (loadStrategy === undefined) {
loadStrategy = 'search';
setAttributes({ loadStrategy: loadStrategy });