I am facing an issue with my table where the columns have varying widths. To implement sticky headers, I need to calculate the column widths accurately.
Initially, I created a function that increases the column width when double-clicking on the header. Surprisingly, it only works for the first double click. Subsequent clicks (4 or 6 times) do not trigger any action after the initial one. Is there a way to reset the event so that the function is triggered again after two more clicks?
While moving the mouse, I noticed that multiple consecutive double clicks can be performed. However, this behavior is not the desired outcome.
Find below the snippet of code:
<th
v-for="c in data.columns"
v-if="visiblecolumns.includes(c)"
v-on:dblclick="COLUMN_DEFINITION[c]+=50"
:style="{ 'min-width': COLUMN_DEFINITION[c] + 'px', 'max-width': COLUMN_DEFINITION[c] + 'px' }">
{{ c }}
</th>