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

Getting the home of an element via ref for vue 3 #1643

Closed
Roman-00 opened this issue Mar 26, 2022 Discussed in #1641 · 1 comment
Closed

Getting the home of an element via ref for vue 3 #1643

Roman-00 opened this issue Mar 26, 2022 Discussed in #1641 · 1 comment

Comments

@Roman-00
Copy link

Discussed in #1641

Originally posted by Roman-00 March 26, 2022
Faced with the following problem:

When iterating through and rendering data via v-for, it is not possible to access the home element via ref.

Vue js version - 3.2.31

The documentation states that it can be obtained as follows - https://vuejs.org/guide/essentials/template-refs.html#refs-inside-v-for

Example from the documentation:

example2

My code example:

example1

example3

example4

but for some reason, it doesn't work.

Maybe someone has already faced such a problem?

@skirtles-code
Copy link
Contributor

I believe this is a core bug rather than a docs problem. See vuejs/core#5525. I believe that'll be fixed in the next patch release, but there's a workaround suggested on that issue in the meantime.

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

No branches or pull requests

2 participants