Hey guys,
I’ve seen, that the component has some predefined methods, see here. To use them I need to get a instance of the ion-tabs element, somehow.
I tried to reference the element with ref="myElement" and then use this as a instance const element = this.$refs.myElement.getSelected();, but I get an error message, which says getSelected() is not a function.
I also tried to get the <ion-tabs> with const tabs = document.querySelector('ion-tabs'); but the getSelected() method isn’t present there, too
here is a bit more of my code:
Hi, did you figure this out? I have the same issue and can’t seem to find an answer. Not very hopeful that this question from June 2019 still remains unanswered in 2021…
This seems to be common thing to do, but for some reason I can’t gain access to the tabs via ref, in a vue.js composition based component.
this.$refs.tabs.$el is populated with what appears to be plain html. It’s not a HTMLElement, its of type Object. Calling getSelected just results in the usual this is not a function error.