-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[email protected] The ref attribute generated by vbind string template has changed #5585
Comments
likely related to |
Your reproduction is not minimal, please read and follow https://new-issue.vuejs.org/?repo=vuejs/vue-next#why-repro when reporting a bug. Most bugs should be reproducible with the SFC Playground. |
Really sorry,edited. |
@posva can this be reopened? There is clear reproduction link now in first post. Since Vue 3 has changed how refs work inside loops (old doc link in Russian): https://v3.ru.vuejs.org/ru/guide/migration/array-refs.html#frontmatter-title |
We decided to revert to Vue 2 behavior since the Vue 3 behavior was undesirable in most cases. The compat entry was also removed. |
Version
3.2.25 or 3.2.33
Reproduction link
Vue SFC Playground Demo
Steps to reproduce
choose Vue Version: 3.2.25 or Version: v3.2.33
click testRef button, see devtools get log
choose Vue Version: 3.2.24
click testRef button, see devtools get log
What is expected?
this.$refs["mInput0"] get dom .
not be wrapped by array
What is actually happening?
Vue Version >= 3.2.25
this.$refs["mInput0"] get a [Array]
Vue Version <= 3.2.24
this.$refs["mInput0"] get dom
Originally by 'this.$refs["mInput0"]' the component object that can be accessed. The outer layer is wrapped with an array. I
must use 'this.$refs["mInput0"][0]' to access
The text was updated successfully, but these errors were encountered: