smasala / ColResize

DataTables extension to make columns resizable
MIT License
22 stars 12 forks source link

Add ability to save column sizes #8

Closed PatrickHarriss closed 6 years ago

PatrickHarriss commented 6 years ago

When using the stateSave Datatables functionality would like the column sizes saved so when the user expands or shrinks the column size it will remember those settings the next time the table is initialized.

konuch commented 6 years ago

This feature would be really appreciated.

smasala commented 6 years ago

@PatrickHarriss ~I don't think there will be plans to alter the default save state mechanism to accommodate the plugin.~ A possibility would be to get and save the widths of the columns on stateSaveCallback in a separate object and read and set the widths during stateLoadCallback again.

Could look to utilise the https://datatables.net/reference/event/stateSaveParams and https://datatables.net/reference/event/stateLoadParams.

PatrickHarriss commented 6 years ago

Thanks for looking at this, and thanks for the plugin. I'll look into the suggestions you gave. I was going to mention that the ColReorder plugin saves the state of the column order but realized that is an extension and not a plugin so might not be apples to apples.

smasala commented 6 years ago

Solved with latest release v2.6.0

smasala commented 6 years ago

@PatrickHarriss @konuch did the latest release solve the issue?

PatrickHarriss commented 6 years ago

It did. Thank you.