Skip to content

Commit

Permalink
fix(detachable): check for non-scoped activator slot first
Browse files Browse the repository at this point in the history
  • Loading branch information
KaelWD committed Jan 31, 2019
1 parent 9856ed6 commit 4fe2d02
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/vuetify/src/components/VDialog/VDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default {
}
}

if (this.$scopedSlots.activator) {
if (this.$scopedSlots.activator && !this.$slots.activator) {
const activator = this.$scopedSlots.activator({ on: listeners })
this.activatorNode = activator
return activator
Expand Down
10 changes: 4 additions & 6 deletions packages/vuetify/src/components/VMenu/mixins/menu-generators.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ export default {
}
}

if (this.$scopedSlots.activator) {
const activator = this.$scopedSlots.activator({ on: listeners })
this.activatorNode = activator
return activator
}

if (this.$slots.activator) {
const options = {
staticClass: 'v-menu__activator',
Expand All @@ -33,6 +27,10 @@ export default {
}

return this.$createElement('div', options, this.$slots.activator)
} else if (this.$scopedSlots.activator) {
const activator = this.$scopedSlots.activator({ on: listeners })
this.activatorNode = activator
return activator
}
},

Expand Down
9 changes: 4 additions & 5 deletions packages/vuetify/src/components/VTooltip/VTooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,15 @@ export default {
}
}

if (this.$scopedSlots.activator) {
const activator = this.$scopedSlots.activator({ on: listeners })
this.activatorNode = activator
return activator
}
if (this.$slots.activator) {
return this.$createElement('span', {
on: listeners,
ref: 'activator'
}, this.$slots.activator)
} else if (this.$scopedSlots.activator) {
const activator = this.$scopedSlots.activator({ on: listeners })
this.activatorNode = activator
return activator
}
}
},
Expand Down

0 comments on commit 4fe2d02

Please sign in to comment.