useTemplateRef
Fails to Populate Ref Array When Slot Content Is Rendered in v-for
#12489
Labels
need documentation
Not necessarily a bug, but proper documentation is needed
Vue version
3.5.12, 5a5406d
Link to minimal reproduction
https://play.vuejs.org/#...
Steps to reproduce
What is expected?
useTemplateRef
populatesmyNewItemRefs
with an array of referenced elements after they are rendered.What is actually happening?
useTemplateRef
populatesmyNewItemRefs
with the last rendered instance of the referenced element.System Info
My local vue is running in a WSL instance:
Any additional comments?
The documentation specifies that
useTemplateRef
should supportv-for
, with no mention of exceptions for slots. If this behavior is intentional, the documentation should explicitly state it. Otherwise, this represents an inconsistency with prior behavior and expectations.The text was updated successfully, but these errors were encountered: