Skip to content

Commit

Permalink
Fix expand slot components are not in the vue tree
Browse files Browse the repository at this point in the history
This makes any vue global property inaccessible within the expand slot (eg: try accessing $store within the expand slot and you'll get undefined)
  • Loading branch information
Tofandel authored Aug 7, 2020
1 parent bb45a39 commit 93fd067
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/vsTable/vsTr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ export default {
} else {
tr.classList.add('tr-expandedx')
let trx = Vue.extend(trExpand);
let instance = new trx();
instance.$props.colspan = this.colspan
instance.$slots.default = this.$slots.expand
let instance = new trx({parent: this, propsData: {colspan: this.colspan}});
instance.vm = instance.$mount();
var newTR = document.createElement('tr').appendChild(instance.vm.$el);
this.insertAfter(tr, newTR)
Expand Down

0 comments on commit 93fd067

Please sign in to comment.