stencil
stencil copied to clipboard
bug: Using the same EventEmitter name in child component leads to additional emission from parent component.
Prerequisites
- [X] I have read the Contributing Guidelines.
- [X] I agree to follow the Code of Conduct.
- [X] I have searched for existing issues that already report this problem, without success.
Stencil Version
"@stencil/core": "^2.13.0"
Current Behavior
Using the same EventEmitter name in child component leads to additional emission from parent component. I try to set bubbles: false, but still doesn't work.
Expected Behavior
Child component events emitters should always be treated as separate ones as naming conflict in those can occur.
Steps to Reproduce
- Have parent component with an event emitter, lets call it
valuechange - Have child component with the same event emitter name
valuechange - Use child component in parent
- Use parent component after compilation and attach even listener using addEventListener function for
valuechangeevent - Emit
valuechangeevent from child component.
Code Reproduction URL
https://github.com/gikey/stencil-demo
Additional Information
No response
Hey @gikey 👋
Thanks for the reproduction case! Can you do me a favor and add what you're seeing in the reproduction case that demonstrates this issue? Specifically, can you add the following for me:
- Steps to run the reproduction case (I used
npm start, but want to make sure we're on the same page here) - How to interact with the reproduction case to recreate the bug
- What someone should see in the console/application/component that demonstrates what the bug is
Thanks!
Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.
Please reproduce this issue in an Stencil starter component library and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.
For a guide on how to create a good reproduction, see our Contributing Guide.
I'm going to close this issue due to lack of reproduction case. If this is still an issue, please feel free to create a new issue with a minimal reproduction URL for the team to pull down and take a look at. Thanks!