I am currently working on a project that requires a dual scroll feature, where there will be a scroll bar both above and below the table.
The table width will be determined by the user's action of adding more columns, making the width dynamic.
Below is the code snippet of what I have implemented for the second scroll bar.
<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>
My goal is to set the size of div1 based on the width of the content so that both scrolls start at the same time.
I have attempted to use JavaScript to get the width using this.$refs["content"]
and then set the width of div1, but it does not seem to be working properly.
I would greatly appreciate any assistance in resolving this issue. Thank you.