question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Event names cannot contain dashes

See original GitHub issue

Given a vue component that emits an event like this:

this.$emit('something-happened')

I can’t listen to this even with v-on-something-happened on a <vue-component /> tag and all events have to be named without any word separation inside the Vue component:

this.$emit('somethinghappened')

Expected result:

Be able to use v-on-something-happpened="fn" attribute and listen to all Events triggered by the Vue component.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
pcablecommented, Jan 11, 2019

I’m also having this issue. The callback in your case is being registered as somethingHappened however vue lowercases all event name when its going to call the callback so it never finds it. I’m trying to create a patch

0reactions
nicolaspayotcommented, Apr 22, 2019

This pull request https://github.com/ngVue/ngVue/pull/83 should fix the issue. Please, feel free to review it 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Function names cannot contain dashes. · Issue #1735 - GitHub
Function names cannot contain dashes. ... Provide a function name that contains a '-' The emulator will error out with an error similar...
Read more >
Can't create dashboard filter with hyphenated event names
I noticed when we started using hyphens in our event names that we now have to surround the event name with `backticks` in...
Read more >
Are dashes allowed in javascript property names?
Thus, the answer is actually "yes"... dashes are allowed in property names, as demonstrated above. They must be accessed using the above demonstrated...
Read more >
File names containing dash - Esri Community
I cannot, however, save the output of Spatial Join with a name containing a dash character (our project numbers are like "14-P-575".).
Read more >
Error occurs when running a SQL-92 query that contains a ...
Dashes and hyphens in table or field names are considered special characters. This error behavior generally occurs in the following ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found