stencil icon indicating copy to clipboard operation
stencil copied to clipboard

bug: Using the same EventEmitter name in child component leads to additional emission from parent component.

Open gikey opened this issue 3 years ago • 2 comments

Prerequisites

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 namevaluechange
  • Use child component in parent
  • Use parent component after compilation and attach even listener using addEventListener function for valuechange event
  • Emitvaluechange event from child component.

Code Reproduction URL

https://github.com/gikey/stencil-demo

Additional Information

No response

gikey avatar Aug 01 '22 03:08 gikey

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!

rwaskiewicz avatar Aug 01 '22 14:08 rwaskiewicz

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.

ionitron-bot[bot] avatar Aug 01 '22 14:08 ionitron-bot[bot]

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!

rwaskiewicz avatar Aug 22 '22 12:08 rwaskiewicz