Add/emit show/hide events in EditorFloatingMenu component
This commit is contained in:
@@ -29,6 +29,12 @@ export default {
|
||||
editor,
|
||||
element: this.$el,
|
||||
onUpdate: menu => {
|
||||
// the second check ensures event is fired only once
|
||||
if (menu.isActive && this.menu.isActive === false) {
|
||||
this.$emit('show', menu)
|
||||
} else if (!menu.isActive && this.menu.isActive === true) {
|
||||
this.$emit('hide', menu)
|
||||
}
|
||||
this.menu = menu
|
||||
},
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user