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

Can't listen to events when injecting component in non-vue project #17

Open
JudahDoupe opened this issue May 20, 2019 · 1 comment
Open

Comments

@JudahDoupe
Copy link

When using Vue as a library injected into another project, we are unable to catch the events due to naming. We get a "Vue Tip" warning in the console which keeps us from being able to catch the event.

[Vue tip]: Event "dateselected" is emitted in component at App.vue but the handler is registered for "dateSelected". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "date-selected" instead of "dateSelected".

Changing the event name from "dateSelected" to "date-selected" fixed the problem.

@sethmfuller
Copy link

This pull request should fix the issue @JudahDoupe is talking about. If @liloow can merge the request, that would be great!

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

No branches or pull requests

2 participants