Skip to content

Commit 4160a82

Browse files
committed
Only show multiselect widget inside an array
1 parent 42426dd commit 4160a82

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/ui.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,14 @@ function FormField(props) {
4444
inputProps.options = props.schema.choices;
4545
type = 'select';
4646
}
47-
if (props.schema.widget)
48-
type = props.schema.widget;
47+
if (props.schema.widget) {
48+
if (props.schema.widget === 'multiselect' && props.parentType !== 'array') {
49+
// pass
50+
} else {
51+
type = props.schema.widget;
52+
}
53+
}
54+
4955

5056
let InputField;
5157

0 commit comments

Comments
 (0)