Disable colReorder column index change?

Disable colReorder column index change?

krychaj5krychaj5 Posts: 19Questions: 8Answers: 0

Hi.

I'm using colReorder extension and show/hide columns
https://datatables.net/examples/api/show_hide.html

I have one problem - my "toggle vis" links are like this one:
<a class="toggle-vis" data-column="1">Position</a>

This link will toggle data-column with index "1" BUT when I'm using colReorder and put this column for example to the left - this index will change to "0" and when I'm clicking to show/hide this column, my link is toggling bad column.

Is there any solution for this situation, to make "show/hide column" link sticky to providen column?

This discussion has been closed.