Warning when emitting kebab-cased custom event
Having a component that emits a kebab-cased event (e.g. new-value
as in Quasar's QSelect
), you see the following warning:
Component emitted event "new-value" but it is neither declared in the emits option nor as an "onNew-value" prop.
The component actually defined a prop named onNewValue
- without extra-listing new-event
in it's emits
property.
It looks like this is due to the toHandlerKey helper only capitalizes the event name - which then only converts the first character to UPPERCASE.
Conventions done't allow non-camelized properties - so I think the toHandlerKey
actually needs to capitalize(camelize(str))
Hello, thank you for taking time filling this issue!
However, we kindly ask you to use our Issue Helper when creating new issues, in order to ensure every issue provides the necessary information for us to investigate. This explains why your issue has been automatically closed by me (your robot friend!).
I hope to see your helper-created issue very soon!