panthro
panthro

Reputation: 24061

Using $ref to access child elements?

I have a list with a $ref on the ul:

<ul ref="list">
    <li></li>
    ....

Is there a way to access all the li by using this.$refs.list?

Upvotes: 0

Views: 257

Answers (1)

Evan Lalo
Evan Lalo

Reputation: 1273

You should be able to access the children of the ref.

Something like this.

this.$refs.list.children....

Upvotes: 2

Related Questions