Skip to content

Commit ed7a87b

Browse files
authored
Merge pull request bootstrap-vue#37 from mathlet0x/master
Fixed issues on tabs/tab bootstrap-vue#34
2 parents 1d86bf1 + b7e904b commit ed7a87b

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

components/tab.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default {
1111
return {
1212
fade: this.$parent.fade,
1313
animate: false,
14+
active: false
1415
}
1516
},
1617
props: {
@@ -22,10 +23,6 @@ export default {
2223
type: String,
2324
default: ''
2425
},
25-
active: {
26-
type: Boolean,
27-
default: false
28-
},
2926
disabled: {
3027
type: Boolean,
3128
default: false

components/tabs.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@
7171
if (activeTab !== -1) {
7272
// setting animate to false will trigger fade out effect
7373
this.items[activeTab].active = false;
74-
this.$children[activeTab].$set('animate', false);
75-
this.$children[activeTab].$set('active', false)
74+
this.$set(this.$children[activeTab], 'animate', false);
75+
this.$set(this.$children[activeTab], 'active', false);
7676
}
7777
7878
// set new active tab and animate (if fade flag is set to true)
79-
this.$children[index].$set('active', true);
79+
this.$set(this.$children[index], 'active', true);
8080
this._tabAnimation = setTimeout(() => {
8181
// setting animate to true will trigger fade in effect
8282
this.items[index].active = true;
83-
this.$children[index].$set('animate', true);
83+
this.$set(this.$children[index], 'animate', true);
8484
this.$root.$emit('changed::tab', this.items[index].id)
8585
}, this.fade ? TRANSITION_DURATION : 0)
8686
},

0 commit comments

Comments
 (0)