Multiselect editor
cellEditor: 'multiselect' picks several items in one cell. It suits tags or permissions. The input shows the picked labels joined by ", ", and the list turns each item on or off with a check box.
{ id: 'tags', editable: true, cellEditor: 'multiselect',
editorOptions: [{ value: 'a', label: 'Urgent' }, { value: 'b', label: 'Review' }],
editorParams: { selectAll: true } }It needs the optional editors bundle (maxgrid/editors in the modular build). Without the bundle, creating the grid fails with invalid-option. The list comes from the same sources as the Combobox editor: a fixed array, a per-row function or optionsFrom. An empty list keeps the editor closed.
Options
All go in editorParams. Defaults apply when omitted.
| Option | Value | Default | Effect |
|---|---|---|---|
separator | string of 1-3 chars | ',' | Separator of the string mode, and of items in copy, paste and export |
selectAll | boolean | false | Puts a "Select all" row at the top; hidden while the list is filtered |
valueAs | 'array' · 'string' | 'array' | Value shape; string stores the values joined by the separator |
maxHeight | integer 80-600 (px) | 240 | Maximum list height |
noResultsText | string | per language | Text shown when the filter matches nothing |
Common input attributes such as placeholder work as usual. An unknown key or a wrong value fails at creation with invalid-option.
Value
| Case | Value |
|---|---|
Default (array) | Array of the picked values, in option order, not click order |
valueAs: 'string' | Picked values joined by the separator ('a;c'); read back by splitting and trimming |
| Nothing picked | [] for arrays, '' for strings, null when the column has emptyAs: 'null' |
| Stored value not in list | Not switched on in the list; dropped when committed |
Array values are compared deeply, so only real changes are recorded: a new array with the same content is not a change, and undo restores the previous array.
Keyboard
| Input | Action |
|---|---|
| ↓ · ↑ | Opens a closed list; moves the active item in an open list |
| Home · End | Jumps to the first or last item while the list is open |
| Space | Toggles the active item; without an active item it types a space |
| Typing | Filters the list by the item text |
| Enter | Commits the whole selection |
| Esc | Closes an open list and restores the input text; a second press cancels the edit |
The list is role="listbox" with aria-multiselectable="true", and picked items have aria-selected="true". The active item is exposed by aria-activedescendant. On a narrow screen the list opens as a bottom sheet like the combobox, and pressing an item does not close it.
Display, copy, export and filter
| Feature | Behavior |
|---|---|
| Display | Picked labels joined by ", "; a label comes from optionLabel, a fixed editorOptions label, then the value |
| Copy and export | The same labels joined by the separator; formatValue wins when present |
| Paste | Splits by the separator and matches an item label or value; unknown pieces are dropped, and a cell where nothing matches is skipped |
| Sort, quick filter | Use the displayed text |
| Filter list, conditions | The list shows each item; in and equals pass when any element matches, notEquals and notContains only when none does |
A function-valued editorOptions has no labels the display can know, so give such a column an optionLabel too.
Gallery example: edit-multiselect
Gallery example: edit-multiselect-string