jeffreydwalter / ColReorderWithResize

Column reordering and resizing plug-in for DataTables
http://www.datatables.net/
MIT License
42 stars 51 forks source link

resize save current state #7

Closed dpetrov closed 6 years ago

dpetrov commented 6 years ago

The plugin works nicely with datatables 1.10.12, however I can't save the current state after resizing some columns. Do you have any tips how can I achieve saving state?

Thanks

jeffreydwalter commented 6 years ago

Hello, sorry for the delayed reply. Take a look at this article https://datatables.net/forums/discussion/9695/problem-with-fnsavestate-and-fnloadstate

I believe you need to define the fnSaveState and FnLoadState methods.

dpetrov commented 6 years ago

Thanks for the follow up. That didn't work, as Datatables doesn't save/restore the column widths. I had to listen for resize and store into the localStorage the latest column sizes, which I was able to restore each time after the table initilization.