Skip to content

Commit 8abb7ee

Browse files
fix: removed v-for for refs, close #400
1 parent 528c660 commit 8abb7ee

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/api/special-attributes.md

-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848
<child-component :ref="(el) => child = el"></child-component>
4949
```
5050

51-
When used on elements/components with `v-for`, the registered reference will be an Array containing DOM nodes or component instances.
52-
5351
An important note about the ref registration timing: because the refs themselves are created as a result of the render function, you cannot access them on the initial render - they don't exist yet! `$refs` is also non-reactive, therefore you should not attempt to use it in templates for data-binding.
5452

5553
- **See also:** [Child Component Refs](../guide/component-template-refs.html)

src/guide/component-template-refs.md

-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ Also, you can add another `ref` to the component itself and use it to trigger `f
3838
this.$refs.usernameInput.focusInput()
3939
```
4040

41-
When `ref` is used together with `v-for`, the ref you get will be an array containing the child components mirroring the data source.
42-
4341
::: warning
4442
`$refs` are only populated after the component has been rendered. It is only meant as an escape hatch for direct child manipulation - you should avoid accessing `$refs` from within templates or computed properties.
4543
:::

0 commit comments

Comments
 (0)