I’m using npm package @headlessui/vue v1.7.22 in my Vue app like so:
import { TabGroup, TabList, Tab, TabPanels, TabPanel } from "@headlessui/vue";
<TabGroup @change="changeTab">
<TabList .......
The changeTab function simply tells me which tab the user clicked on:
function changeTab(index) {
console.log('Changed active tab to:', index)
}
I need to know which TabGroup element, not just the tab, the user clicked on. I’ve tried to pass ‘this’ into the changeTab function, but it didn’t work.
<TabGroup @change="changeTab(this)">
How do I get a reference to the specific TabGroup element the user clicked on? Thanks