Bug with stateSave and colReorder, column order shift around on datatable recreation

Bug with stateSave and colReorder, column order shift around on datatable recreation

DesconhecidoDesconhecido Posts: 11Questions: 5Answers: 0
edited March 2016 in Free community support

Hello!

I'm having an issue using stateSave and colReorder, the way I'm doing things, I create a datatable instance then I destroy it and recreate it (I do that to switch datatables into ajax request mode and change other parameters).
Doing this is causing me troubles, the ajaxed values are then loaded into wrong columns.
I've created an offline test case, it doesn't recreate my problem exactly but I think it shows something is wrong.

Just press destroy button, for each time you press the button, the field order on the table will shift around.
Why? Is this expected? I think that's what's causing the ajaxed values to get into the wrong columns...

http://live.datatables.net/kololufo/3/edit?html,css,js,output

EDIT: I just added ajax datasource, so you can see the data being loaded into the wrong columns (column titles shift around, data do not). If you remove the "ajax" inside the test() function, you can see the issue happening with just the column names.

This discussion has been closed.