Skip to content

fix: setting initial value of activeIndex for Tabs #766

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

Merged
merged 1 commit into from
Sep 19, 2022
Merged

fix: setting initial value of activeIndex for Tabs #766

merged 1 commit into from
Sep 19, 2022

Conversation

mrtnmtth
Copy link
Contributor

Is this a bug fix or enhancement?

bug fix

Is there a related issue?

no

Any Breaking changes?

none

Some further details

Setting the active Tab initially via modal binding is broken in Vue 3.

On component creation activeIndex does not get set to the modelValue due to the watcher being lazy by default. This fix changes the watcher to an eager one (more details in Vue's docs).

I also extended a test to cover this behavior.

@wxsms wxsms merged commit 4235c08 into uiv-lib:dev Sep 19, 2022
@wxsms
Copy link
Member

wxsms commented Sep 19, 2022

released in 2.0.4

@mrtnmtth
Copy link
Contributor Author

Thanks.

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

Successfully merging this pull request may close these issues.

2 participants