Community
Multi-select not working with options (only with lookup)
yesterday by Dennis
Problem
A select with multiple: true does not work when using options, but works fine when using lookup.
It seems like multiple is only supported together with lookup, even though the documentation does not indicate that limitation.
Working examples
Single select using lookup (works)
+formElement({
type: 'select',
name: 'singlelookup',
multiple: false,
label: "Single select from lookup",
lookup: {
type: "option",
tag: ["department"]
}
})
Multi select using lookup (works)
+formElement({
type: 'select',
name: 'multilookup',
multiple: true,
label: "Multi select from lookup",
lookup: {
type: "option",
tag: ["department"]
}
})
Single select using options (works)
+formElement({
type: 'select',
name: 'singleoptions',
multiple: false,
label: "Single select from options",
options: [
{ value: 'option1', label: 'Option 1' },
{ value: 'option2', label: 'Option 2' },
{ value: 'option3', label: 'Option 3' },
]
})
Not working
Multi select using options (does NOT work)
+formElement({
type: 'select',
name: 'multioptions',
multiple: true,
label: "Multi select from options",
options: [
{ value: 'option1', label: 'Option 1' },
{ value: 'option2', label: 'Option 2' },
{ value: 'option3', label: 'Option 3' },
]
})
Additional notes
- I’ve also tested alternative option formats without success:
options: ["option1", "option2", "option3"]
- I’ve tried different property names like
keyandtextinstead ofvalue/label. - The documentation does not mention any limitation where
multiplewould only work withlookup.
Question
- Is there another required property or format when using
multipletogether withoptions? - Or is this possibly a bug that could be fixed?
