Closed
Description
Version
3.2.29
Reproduction link
Steps to reproduce
Create a component.
In the component add the emits option: emits: ['onDelete']
In the components template add an if statement to determine if the event is bound to the component v-if="$attrs.onOnDelete"
In the parent add an event handler such as @click="onDelete"
What is expected?
In the Vue3 docs it recommends to define what events a child component can emit to the parent https://v3.vuejs.org/guide/migration/emits-option.html#overview
If the parent binds the event onDelete I would expect the component to be displayed.
What is actually happening?
The component is not displayed.
See the discussion here: https://stackoverflow.com/questions/70272335/vue3-check-if-event-listener-is-bound-to-component-instance/70358655?noredirect=1#comment125169175_70358655
Metadata
Metadata
Assignees
Labels
No labels