Reference Field Reference
fields.multiSelect()
Deprecated: use fields.select({ multiple: true }), which compiles to the same field and stores the same array of values.
Deprecated since @strifeapp/schema 0.21. Use fields.select({ multiple: true }) — multiSelect() now compiles to exactly that.
Multiple-choice selection, stored as a plain array of the chosen value strings, in the order the options are declared.
Up to 0.20 it compiled to the Multi Select editor (str-multi-select). From 0.21 it compiles to { name: 'str-select', type: 'select' } with attributes.multiple: true. The stored shape is the same, so existing documents need nothing; only the template's editor changes on your next strife push.
Example
fields.multiSelect({
label: 'Tags',
options: [
{ name: 'News', value: 'news' },
{ name: 'Product', value: 'product' },
] as const,
})
// same as fields.select({ label: 'Tags', multiple: true, options: [...] as const })
// _output: ('news' | 'product')[]Options
The options of fields.select(), without multiple (always on).
Output type
O[number]['value'][] — the array of chosen option-value literals.
See also
fields.select()— the field to use instead.- Multi Select — the Strife Studio editor
multiSelect()compiled to before 0.21.