vuetensils icon indicating copy to clipboard operation
vuetensils copied to clipboard

VTabs: Added custom event 'tabChange' when tab is changed from click or keydown.

Open Jscherbe opened this issue 3 years ago • 1 comments

This is something I needed when using the VTabs component in my project. My use case was needing to do something programatic within a tab when it's made visible.

When the user activated a certain tab I needed to update DOM calculations once it was visible. The event allowed me to act on the tab change.

The code checks to make sure the activeIndex is changing and not being set to the same index, so that the event name tabChange is concise.

I updated the documentation if you decide to include the pull request.

Jscherbe avatar Sep 22 '20 18:09 Jscherbe

Hey @Jscherbe, this looks like a really good addition. Please allow me some time to play around with the idea. Looks good so far though.

AustinGil avatar Sep 22 '20 18:09 AustinGil