Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event names for Custom Elements should be automatically transformed #5373

Closed
crackalak opened this issue Feb 8, 2022 · 0 comments · Fixed by #5378
Closed

Event names for Custom Elements should be automatically transformed #5373

crackalak opened this issue Feb 8, 2022 · 0 comments · Fixed by #5378

Comments

@crackalak
Copy link

Version

3.2.30

Reproduction link

stackblitz.com

Steps to reproduce

Click the button to fire the custom event on the custom element

What is expected?

The myTemplateEventListener method should be called

What is actually happening?

The myTemplateEventListener method is not called


I would expect the event to be automatically transformed to kebab-case to follow the documentation:
https://vuejs.org/guide/components/events.html#emitting-and-listening-to-events

Like components and props, event names provide an automatic case transformation. Notice we emitted a camelCase event, but can listen for it using a kebab-cased listener in the parent. As with props casing, we recommend using kebab-cased event listeners in templates.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants