We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70cc351 commit e9c3a74Copy full SHA for e9c3a74
src/formBuilder/utils.js
@@ -1103,6 +1103,14 @@ export function generateElementComponentsFromSchemas(parameters: {
1103
});
1104
1105
const elementList = elementPropArr.map((elementProp, index) => {
1106
+ const MIN_CARD_OPEN_ARRAY_LENGTH = index + 1;
1107
+ const currentLength = cardOpenArray.length;
1108
+
1109
+ if (currentLength < MIN_CARD_OPEN_ARRAY_LENGTH) {
1110
+ cardOpenArray.push(
1111
+ ...new Array(MIN_CARD_OPEN_ARRAY_LENGTH - currentLength).fill(false),
1112
+ );
1113
+ }
1114
const expanded =
1115
(cardOpenArray && index < cardOpenArray.length && cardOpenArray[index]) ||
1116
false;
0 commit comments