Multiselect API
Properties
| Name | Type | Default | Description |
|---|---|---|---|
items | array | [] | Options for the multiselect. Each item has content, value, and optional selected, disabled, status fields. Items can also be groups with a type: 'group' field containing nested items. |
value | array | — | Gets or sets the selected values. Matching is based on the item's value property. |
content | array | — | Returns the human-readable content of the selected items. Read-only. |
disabled | boolean | false | Disables the multiselect. |
readonly | boolean | false | Sets the read-only state. The dropdown can still be opened. |
loading | boolean | false | Sets the loading state. The dropdown can still be opened. |
invalid | boolean | false | Sets the invalid (error) state. |
placeholder | string | — | Placeholder text shown when no items are selected. |
always-show-search | boolean | false | Shows the search input even when there are 8 or fewer options. |
label-merge-limit | integer | Infinity | Number of selected options above which they are merged into a single label. |
selection-max | number | — | Maximum number of selectable options. Must be greater than 0. |
JavaScript API
| Name | Kind | Description | |
|---|---|---|---|
clear() | action | Deselects all selected options. | |
Events
| Event | Description | Returns | |
|---|---|---|---|
change | Fires when the selection changes. | { detail: { selectedOptions: array } } | |
search | Fires when the user types in the search field. Ensure selected items remain in the filtered results. | { detail: { value: string } } | |
open | Fires when the dropdown opens. | — | |
close | Fires when the dropdown closes. | — | |