Events
Property | Type | Description |
---|---|---|
on_change | function | (optional) (preferred) this event gets triggered once the tab changes its selected key. Returns { key, selected_key, focus_key, event } . |
on_click | function | (optional) This event gets triggered once the tab gets clicked. Returns { key, selected_key, focus_key, event } . |
on_focus | function | (optional) This event gets triggered once the tab changes its focus key. Returns { key, selected_key, focus_key, event } . |
on_mouse_enter | function | (optional) This event gets triggered once the user';s mouse enters a tab (hover). Returns { key, selected_key, focus_key, event } . |
Prevent a change
You can prevent a change from happening by returning false on the on_click
event handler:
<Tabson_click={() => {if (condition === true) {return false}}}on_change={() => {// Will not get emitted}}/>