Skip to content

Events

PropertyTypeDescription
onPreChangefunction(optional) Will be called before onChange, this way you can return false to prevent selection and to prevent onChange execution.
onChangefunction(optional) Will be called on state changes made by the user.
onSelectfunction(optional) Will be called once the user focuses or selects an item by a click or keyboard navigation.
onShowfunction(optional) Will be called once the user presses the drawer-list.
onHidefunction(optional) Will be called once the user presses the drawer-list again, or clicks somewhere else.

The onChange vs onSelect difference

The difference between onChange and onSelect is:

  • onChange will be called when the state changes, either with a click or space/enter keypress confirmation.
  • onSelect 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.