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?


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.

  • Exactly what I was looking for. Thank you so much! Jul 1 '19 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.