[SalesForce] Lightning Tabset tab change callback (LWC)

I am looking to track when the tabs are changed using the lightning-tabset component. The aura version used to have the onselect callback, but there is no equivalent in LWC. Do I have to recreate my own version with a proper callback or is there some other method that I can use?

Best Answer

The Tab Component have an active Event which is fired everytime their content gets activated.

Example: https://developer.salesforce.com/docs/component-library/tools/playground/iLdDbNpDm/1/edit

Note though that it is not documentated (and i don`t know if it is just missing or by purpose). It is used though for the lazy loading example so i guess you should be fine

If that not fulfill your needs then you have to implement a custom component.

Related Topic