Skip to content

Conversation

@skirtles-code
Copy link
Contributor

I've fixed 3 problems with these examples.

  1. ref is unused, close ref is unused in array example #766.
  2. The setItemRef function needs an if check, otherwise removed nodes will be pushed as null. This is effectively the same problem I reported in Composition API template refs with v-for example - update problem #353, though in a different part of the docs.
  3. The setup function should not return itemRefs, it's highly misleading. itemRefs is reassigned in onBeforeUpdate but that won't update the value returned from setup. There are other ways to fix this (set the length to 0 or wrap it in a ref) but this seemed the simplest.

@NataliaTepluhina NataliaTepluhina merged commit 24c809e into vuejs:master Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ref is unused in array example

2 participants