Skip to content
New issue

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

Swapping ref attributes leads to a null in $refs #1834

Closed
skirtles-code opened this issue Aug 12, 2020 · 1 comment · Fixed by #1835
Closed

Swapping ref attributes leads to a null in $refs #1834

skirtles-code opened this issue Aug 12, 2020 · 1 comment · Fixed by #1835

Comments

@skirtles-code
Copy link
Contributor

Version

3.0.0-rc.5

Reproduction link

https://jsfiddle.net/skirtle/ajrgdz84/6/

Steps to reproduce

  1. Open the console log.
  2. Click the Toggle button.
  3. Observe the logged $refs.

What is expected?

One of the $refs should be an HTMLInputElement (exactly which one depends on how many times you click the button).

What is actually happening?

Prior to clicking the Toggle button everything is fine. After clicking the button the HTMLInputElement is missing from the $refs and the relevant entry is set to null instead.


This may appear similar to #1789 but I believe it's different and the fix proposed in #1808 will only fix that issue, not this one.

The example I've provided here is somewhat contrived but I believe the usage is 'correct'. It does seem to function as expected against Vue 2.

@xjh1230
Copy link

xjh1230 commented Sep 17, 2020

why refs value changed from array(vue2) to single(vue3)

@github-actions github-actions bot locked and limited conversation to collaborators Nov 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants