Events
| Property | Type | Description |
|---|---|---|
on_pre_change | function | (optional) Will be called before on_change, this way you can return false to prevent selection and to prevent on_change execution. |
on_change | function | (optional) Will be called on state changes made by the user. |
on_select | function | (optional) Will be called once the user focuses or selects an item by a click or keyboard navigation. |
on_show | function | (optional) Will be called once the user presses the drawer-list. |
on_hide | function | (optional) Will be called once the user presses the drawer-list again, or clicks somewhere else. |
The on_change vs on_select difference
The difference between on_change and on_select is:
on_changewill be called when the state changes, either with a click or space/enter keypress confirmation.on_selectdiffers most when the user is navigating by keyboard. Once the user is pressing e.g. the arrow keys, the selection is changing, but not the state.