Simple Multi-Select
Classes
Type Aliases
onChangeCallback
Ƭ onChangeCallback: (multiSelectId: string, values: string[]) => void
Type declaration
▸ (multiSelectId, values): void
The expected function to call when an option is changed
Parameters
| Name | Type | Description |
|---|---|---|
multiSelectId | string | The id of the multi select that was changed |
values | string[] | The selected values |
Returns
void
Functions
InitializeAllMultiSelects
▸ InitializeAllMultiSelects(root?): MultiSelect[]
This function initializes all multi-selects on the page.
Searches for all native selects with the multiple attribute, insures they have not already been initialized, and initializes them.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
root | HTMLElement | Document | document | The root element to search for multi-selects. Defaults to the document. |
Returns
Returns an array of initialized multi-selects.