Events
Events | Description |
---|---|
on_change | (optional) (preferred) this event gets triggered once the tab changes its selected key. Returns { key, selected_key, focus_key, event } . |
on_click | (optional) this event gets triggered once the tab gets clicked. Returns { key, selected_key, focus_key, event } . |
on_focus | (optional) this event gets triggered once the tab changes its focus key. Returns { key, selected_key, focus_key, event } . |
on_mouse_enter | (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:
<Tabs...on_click={() => {if(condition === true){return false}}}on_change={() => {// Will not get emitted}}/>