-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
Binding of events on dynamic components produce warnings #10939
Comments
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. vuetifyjs/vuetify#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? |
In fact, my question is how should we amend the code, since i found no dynamic way to do it. |
I think the warning is a good thing because of the reason stated in #9884
But as also stated in this pull request:
With the addition that it shouldn't throw a warning at least when used that way with dynamic components. |
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 |
A |
hi, not sure if necessary (because the problem seems pretty clear already) but i just wanted to add that i have the same problem - my scenario is the following:
where "element" can either be a router-link or a regular div element - but if it is a div element i get the warning/error anyway thanks @maoberlehner for explaining what is happening (and yes - i like your suggestion
hope this can be done at some point! |
Ran into this as well. What's the status on solving this? I could think of a few options as I tried to find a workaround:
Right now it's basically impossible to make a transparent wrapper button that can render either a |
Is there any reason why |
@yyx990803 Using |
had to convert to render function because of vuejs/vue#10939
Any update on this issue? Does this issue still apply to vue3? |
any update ? |
Facing similar issue |
Any... workaround? |
…g with .native modifier (vuejs/vue/issues/10939) and finally revert changes in basePagination introduced in commit 1d4b2fa
Version
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.
The text was updated successfully, but these errors were encountered: