Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vs-tabs :value='selectedTab' not working when value is updated on component mounted callback. #707

Open
maleta opened this issue Nov 5, 2019 · 1 comment

Comments

@maleta
Copy link

maleta commented Nov 5, 2019

After analyzing code on VsTabs and VsTab components, I found problem on the flow I wrote in title.

In method: activeChild in VsTabs component value of this.$refs.li is undefined when seleceted tab index is updated on mounted callback. The workaround for this is to put value selectedTab model as computed property.

The actual problem is probably related to the fact that method activeChild is called in mounted callback of VsTabs component on nextTick.

@Elip-kio
Copy link

Elip-kio commented Apr 21, 2020

You should use v-model to know what active index is; like follow:
<vs-tabs v-model="activeIndex">\

However, it looks like that I cant change activeIndex through modify activeIndex variable in data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants