I am trying to implement a dual scroll where there is a scroll one above and below the table.
The width of the table is based on user action of adding more columns so the width is always dynamic.
What I have done for the second scroll is shown below.
<div class="wrapper1" v-on:scroll.passive="handleScroll1" ref="wrapper1">
<div class="div1" style="width:${this.width} + 'px'"></div>
</div>
<div class="wrapper2" v-on:scroll.passive="handleScroll2" ref="wrapper2">
<div class="content" ref="content" >Content</div>
</div>
Here I want to set the size of div1 based on the content width so that both scroll starts at same time.
I tried using JS to get the width using this.$refs["content"]
and then setting width of div1 but that doesn't seem to work .
Please help me with this.