Skip to content

Refs inside v-for leaking to slots #10851

Open
@yuwu9145

Description

@yuwu9145

Vue version

3.4.25

Link to minimal reproduction

https://play.vuejs.org/#eNqNk8Fu2zAMhl+F0CUp4Dlos10MN8AW9LAd1qHbbRoGLaYTdbIkSLKXwfC7l5LjpCmCoidL4s9fFPm5Zx+tzbsWWcFKv3HShhXXsrHGBVjvpKqgdqaBWb5IuyidcY37JKiwFq0K0HMNsDGUpVEHX0B/yB2yGKlEEPOrUQXgMLROTzsAJX0o4Od1BjcZLH+Nx0P8xGxalItjYbQJ2FglAtIOoNxdr+4talgb7Y3C7HCvVybQRTVIDwK81FuFgAobKg+Ec+J/uaDUZDFmdO9q4245k+QPUqeqOEsK0kyXkixaFwF9IHEP1hnrqdpJSVpLoj9SVxRPUc5g1feQjIehXNjJdHH+lLHBtD4LsIwFvzG6ltv80RtNc0qd4yz2Wyp09zZIej1n1PbRmTOhlPn3JZ0F12KaQsrZ4ebvhfNHv49nnH1z6NF1yNkxFoTbIvUihu++f8U9rY/BxlStIvUrwQekybSxxlH2qdUVlf1Ml6r9nJijSf3wd/uA2k+PioVONEQ1Ebh+5emncpf5+5RHEFEXj/heIr1PsAwH1kfGL1PuiV57gpkm40Oa7QMZ3Eab+dU55xBhib/EpBpOdAM0ptUBqwLqVm/ia869ielcme18ds71LIOwkz6P1vnBN++EajFd/oYfp5LdxOFuuSqTsRYNErXRlKAtEr2JcrqR5vDsrkQ82VMWfchgJHg0fcnv7w5dnCY1nkaS33xgwxNvNnj/

Steps to reproduce

  1. Open reproduction link
  2. Check console logs

What is expected?

Ref from slot props should have single element assignment

What is actually happening?

Ref from slot props has an array containing a single element

System Info

No response

Any additional comments?

Correct behaviour should be:

  • When assigning the same reactive ref to template ref inside v-for, it should hold an array of refs demo
  • When each v-for element has unique reactive ref assigned, it should return the individual element ref only

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions