komarovalexander / ka-table

Lightweight MIT React Table component with Sorting, Filtering, Grouping, Virtualization, Editing and many more
http://ka-table.com
MIT License
769 stars 56 forks source link

Is rows ordering persistent? #379

Closed aleksei-baryshnikov closed 7 months ago

aleksei-baryshnikov commented 7 months ago

Hi.

When I change a cell value the ordering of rows is not persistent.

E.g. I have that data set from a backend at the start with the ordering on the screen as in the dataset: [ { id: 1, value: 1 }, { id: 2, value: 2 }, { id: 3, value: 3 } ]

I've updated cell with id = 2 and have this dataset form the backend: [ { id: 1, value: 1 }, { id: 2, value: 10 }, { id: 3, value: 3 } ] and now I have this oredering on the screen: id:2, id:3, id:1

I've tried to enable/disable default sort, disable sort at all - doesn't help.

Is that expected?

komarovalexander commented 7 months ago

Hi @aleksei-baryshnikov, if ordering disabled then table should not change the order. Please provide an example with your issue on https://stackblitz.com/edit/table-sorting-ts?file=Demo.tsx , thanks