Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
2.5.17-beta.0
https://codepen.io/Stupid/pen/WJmgjm?editors=1010
Create ref within template and in render function, template returns array, render function returns latest item in loop.
render functions should return an array of the "refs" (https://vuejs.org/v2/guide/render-function.html#v-if-and-v-for)
Of course it makes sense that the render function returns the last ref as JS should. But in vue shouldn't it return an array as the template do?
The text was updated successfully, but these errors were encountered:
You need to add refInFor manually to the data object, here:
refInFor
return createElement('li', { ref: 'list_a', refInFor: true }, idx)
Sorry, something went wrong.
Yep, that works! Thx! Shouldn't that be in the docs?
It's listed at the end of the data object: https://vuejs.org/v2/guide/render-function.html#The-Data-Object-In-Depth
No branches or pull requests
Version
2.5.17-beta.0
Reproduction link
https://codepen.io/Stupid/pen/WJmgjm?editors=1010
Steps to reproduce
Create ref within template and in render function, template returns array, render function returns latest item in loop.
What is expected?
render functions should return an array of the "refs" (https://vuejs.org/v2/guide/render-function.html#v-if-and-v-for)
What is actually happening?
Of course it makes sense that the render function returns the last ref as JS should. But in vue shouldn't it return an array as the template do?
The text was updated successfully, but these errors were encountered: