E
E
Eitewi2022-04-09 19:43:43
Vue.js
Eitewi, 2022-04-09 19:43:43

How to set ref on transition-group element?

Hello Transition-Group
type

<transition-group
        name="appearing"
        tag="div"
        class="equalizer"
        ref="equalizer"
        id="equalizer"
      >

creates a div with an equalizer class instead, but I also need to reach it from js. Unfortunately, the ref specified in this way points to the Proxy and not to the element. How to fix it?
It turns out through id, but I want to use vue)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2022-04-09
@Eitewi

ref specified like this points to the Proxy and not the element. How to fix it?

No fix.
If you bothered to read the documentation, you would know that behind this Proxy is a reference to a component instance, and a component instance has a reference to an element as one of its properties.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question