Skip to content

Commit

Permalink
close emits also doc like elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
ValJed committed Dec 12, 2024
1 parent 0f82b8f commit e112914
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}"
@item-clicked="menuHandler"
@open="$emit('menu-open')"
@close="$emit('menu-close', $event)"
@close="$emit('menu-close')"
/>
</template>

Expand All @@ -24,7 +24,6 @@ import AposDocContextMenuLogic from 'Modules/@apostrophecms/doc-type/logic/AposD
export default {
name: 'AposDocContextMenu',
mixins: [ AposDocContextMenuLogic ],
// Satisfy linting.
emits: [ 'menu-open', 'menu-close', 'close' ]
emits: [ 'menu-open', 'menu-close' ]
};
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ export default {
}
const additionalItem = this.additionalMenuItems.find(item => item.action === action);
if (additionalItem?.emitEvent) {
this.$emit('close', additionalItem.action);
this.$emit('close', this.context, additionalItem.action);
return;
}

Expand Down

0 comments on commit e112914

Please sign in to comment.