cristijora / vue-tabs

Simplified bootstrap tabs
https://cristijora.github.io/vue-tabs/#/
MIT License
251 stars 72 forks source link

Hide/show tab #28

Closed ameoba32 closed 6 years ago

ameoba32 commented 7 years ago

I am trying to show hidden tab, but got not that expected. At first it shows both tabs, but later fixes it when clicked. See example here https://jsfiddle.net/p63evL20/

How to achieve this? I need to temporarily hide first tab and show it later.

Thanks.

cristijora commented 6 years ago

Hi @ameoba32 You could try to use v-model for more predictive rendering. https://jsfiddle.net/p63evL20/7/

If you specify via v-model the initial activeTab, then the tab order is most likely to be the correct one.

ameoba32 commented 6 years ago

Yes, v-model works, it saves current tab correctly. Thank you!

Also, if I want to switch to newly shown tab, I came up with next code https://jsfiddle.net/p63evL20/11/

without nextTick it does not work. But its okay :)