Buttons
Buttons copied to clipboard
Fixed column visibility buttons reordering
Previously the new 'data-cv-idx' attribute value was assigned from "$.inArray(conf.columns, details.mapping)". Instead "details.mapping[conf.columns]" is now used.
Moreover, re-sorting the buttons is now performed only when the index has really changed.
Merging under MIT license is fine for me of course.
is there a plan to merge this PR? We are affected for the bug. Thanks!
I'm not yet certain this is the correct fix I'm afraid. It does appear to address the issue, but I "feel" there is still an underlying issue that could cause us problems again in future. I need to look into it more, but haven't had a chance to do so yet I'm afraid. It is on the list though.
+1 See my comment on #154
https://github.com/DataTables/Buttons/issues/154#issuecomment-524290944
I also found out that jquery $.inArray(..... doesn't behave as it should.
So don't know if this PR will fix also #154 but it's worth giving it a try!