Skip to content

Events

PropertyTypeDescription
on_pre_changefunction(optional) Will be called before on_change, this way you can return false to prevent selection and to prevent on_change execution.
on_changefunction(optional) Will be called on state changes made by the user.
on_selectfunction(optional) Will be called once the user selects an item by a click or keyboard navigation.
on_showfunction(optional) Will be called once the user presses the drawer-list.
on_hidefunction(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_change will be called when the state changes, either with a click or space/enter keypress confirmation.
  • on_select differs 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.