Skip to main content

On Leaving

Last updated 26/03/2026

Overview​

The On Leaving event is a client-side event that executes when the tab loses focus because another tab is being selected. It allows the application to react before the user leaves the current tab, such as saving data or validating inputs.

How it Works​

When a user navigates away from a tab:

  1. Another tab gains focus.
  2. The On Leaving client-side event executes for the tab being left.

Use Cases​

  • Validate tab data before leaving
  • Save temporary changes or state