I have an element
<tbody ref="tbody">
<tr class="row" :ref="userIndex" v-for="(userData, uid, userIndex) in users" :key="uid">
in my template. I need to access/edit the DOM property like scrollTop, verticalOffset of <tr>
element. How can I achieve this?
I have tried to access using this.$refs[userIndex][0].$el
but its not working. I can see all the properties in the console but I am unable to access them. However this.$refs.tbody.scrollTop
works.
Below is the snap showing console.log(this.$refs)
console.log(this.$refs[userIndex])
console.log(this.$refs[userIndex][0])
As you can see when I use this.$refs[userIndex][0]
I don't see the DOM properties