omines / datatables-bundle

DataTables bundle for Symfony
https://omines.github.io/datatables-bundle/
MIT License
251 stars 113 forks source link

Merging persisted state and api-state is done wrong #299

Closed roman-1983 closed 1 year ago

roman-1983 commented 1 year ago

Instead of giving priority to the saved state the script currently merges state and api.state() which leads to mixed up ordering.

Example

Default sort order: Column 1, Column 3 DESC User sort order: Column 2 DESC

IS Sort order after merging

Should Sort order after merging

As the user sort order should have priority.

roman-1983 commented 1 year ago

I will take care of this and send a PR.