Binding of events on dynamic components produce warnings
See original GitHub issueVersion
2.6.11
Reproduction link
https://jsfiddle.net/nueorsq5/
Steps to reproduce
Load page, the binding of native events produces warning on the tag.
What is expected?
Should not trigger warning, cause the component is dynamic and could be a component or a DOM node depending on the data passed.
What is actually happening?
It produces warning for every .native
event bound to a DOM node.
The warning is indeed correct, but makes difficult to create dynamic component with such events, since the object notation does not permit to specify native modifiers.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:53
- Comments:13 (3 by maintainers)
Top Results From Across the Web
VueJS warning when using dynamic components and custom ...
I am using dynamic components with 2 custom events. I've tried adding both of the emitted events to the emits object of both...
Read more >How to Bind Event Listeners to Dynamically-Created Elements ...
There's an easy fix for this: we simply add a test to make sure the alert is only performed when the clicked element...
Read more >Dynamically Adding Event Handlers To a Component
You can dynamically add a handler for an event that a component fires. The addEventHandler() method in the Component object replaces the deprecated...
Read more >Alert binding to CIs with event rules
During alert generation, Event Management uses event rules and other mechanisms to automatically bind alerts to CI information from the CMDB ...
Read more >How to dynamically create JavaScript elements with event ...
In JavaScript, attaching event handlers on an element that is not yet created or does not exist on the page will throw an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’d like to clarify again that these are not showing up as warnings in console. They are showing up as errors. As the original PR specified warnings could we have this issue re-titled and tagged as
bug
in addition todiscussion
label please?This issue wasn’t present in 2.6.10. It came in with this commit 861aea1
For clarity this produces errors in console, not warnings as specified in the commit.
It’s affecting a couple of Vuetify components also. https://github.com/vuetifyjs/vuetify/issues/9999
Is this something that is going to be improved in Vue 2.x or does code need to be amended to support this change?