From 8abb7eebd90bd9f4c60132cb0ac34306265b8a1c Mon Sep 17 00:00:00 2001 From: NataliaTepluhina Date: Mon, 14 Sep 2020 18:26:02 +0300 Subject: [PATCH] fix: removed v-for for refs, close #400 --- src/api/special-attributes.md | 2 -- src/guide/component-template-refs.md | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/api/special-attributes.md b/src/api/special-attributes.md index 14f01b9dd0..8413e5704c 100644 --- a/src/api/special-attributes.md +++ b/src/api/special-attributes.md @@ -48,8 +48,6 @@ ``` - When used on elements/components with `v-for`, the registered reference will be an Array containing DOM nodes or component instances. - 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. - **See also:** [Child Component Refs](../guide/component-template-refs.html) diff --git a/src/guide/component-template-refs.md b/src/guide/component-template-refs.md index a454e50fba..e87de3f650 100644 --- a/src/guide/component-template-refs.md +++ b/src/guide/component-template-refs.md @@ -38,8 +38,6 @@ Also, you can add another `ref` to the component itself and use it to trigger `f this.$refs.usernameInput.focusInput() ``` -When `ref` is used together with `v-for`, the ref you get will be an array containing the child components mirroring the data source. - ::: warning `$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. :::