fix for a bug with reorder and colVis extension
fix for a bug with reorder and colVis extension
M_Mode
Posts: 4Questions: 0Answers: 0
Hello,
there is a problem if you use the reorder and buttons (colVis) extension together.
See here: https://datatables.net/extensions/colreorder/examples/integration/colvis.html
- Hide the position column
- Move age on the first position
- Show the position column again
Hide the position column.
Now you see, the class 'active' is removed from the wrong button (here it is office).
To fix this, i have changed buttons.colVis.js (line 64)
a.on("column-visibility.dt" + c.namespace, function(a, b) {
b.bDestroying || f.active(d.visible())
to
a.on("column-visibility.dt" + c.namespace, function(h, b) {
b.bDestroying || f.active(d.visible())
g = a.column(c.columns);
f.active(g.visible());
I know, it's not nice, but it works for now. I think you can make a better fix.
This discussion has been closed.