[b-tabs] v-model is immutable with dynamic tabs
See original GitHub issueIn summary:
- Attach v-model to
<b-tabs>
. I.e:<b-tabs v-model="selectedPage">
. - When creating a new tab (by i.e: clicking a button like in the DOCS), update the
selectedPage
to the length of the tabs content in order to set the active tab to the page that was just created. - Expect the corresponding tab for the new page to be selected. However, it isn’t.
Pseudo:
newPage () {
this.tabs.push('Content')
this.selectedPage = this.tabs.length - 1
}
However, if you hard code this.selectedPage to say 1, the active tab is indeed set.
Here’s a fiddle showcasing the issue: http://jsfiddle.net/mojvw303/10/
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Vuetify tabs won't change when changing v-model
I am binding a variable to v-model and then changing that variable with the value I want. The point is, wheter the value...
Read more >Tabs | Components - BootstrapVue
The tabs component is built upon navs and cards internally, and provides full keyboard navigation control of the tabs. For navigation based tabs...
Read more >Disabled and Invisible Tabs | Nav | Vue Wijmo Demos
Invisible and disabled tabs cannot be selected by the user. This sample demonstrates disabling tabs and showing and hiding tabs. Learn about Wijmo...
Read more >Performance | Vue.js
Overview #. Vue is designed to be performant for most common use cases without much need for manual optimizations. However, there are always...
Read more >Strings - C# Programming Guide | Microsoft Learn
String; Declaring and initializing strings; Immutability of strings; Quoted string ... Immutability of strings ... \v, Vertical tab, 0x000B.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, you forget about Vue updating it’s vdom async. so this example should use nextTick.
Just to check, try to use global nextTick…
Vue.nextTick
instead of component’svm.$nextTick