Skip to content

Commit

Permalink
Don't add empty filler items for multiselect widget
Browse files Browse the repository at this point in the history
  • Loading branch information
bhch committed Jul 4, 2024
1 parent cf98b6f commit 9842be0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,10 @@ function getSyncedArray(data, schema, getRef) {

let minItems = schema.minItems || schema.min_items || 0;

while (data.length < minItems)
data.push(FILLER);
if (schema.items.widget !== 'multiselect') {
while (data.length < minItems)
data.push(FILLER);
}

for (let i = 0; i < data.length; i++) {
let item = data[i];
Expand Down

0 comments on commit 9842be0

Please sign in to comment.