hjalmers / angular-generic-table

A generic table for Angular 2+. Generic table uses standard markup for tables ie. table, tr and td elements etc. and has support for expanding rows, global search, filters, sorting, pagination, export to CSV, column clicks, custom column rendering, custom export values.
https://hjalmers.github.io/angular-generic-table/
MIT License
105 stars 55 forks source link

redraw() is shuffling whole table #206

Closed venkata82 closed 6 years ago

venkata82 commented 6 years ago

I'm rendering cell with row data. When i update that row, that row should only reflect changes. I used redraw() is shuffling whole table when i update one row data.

Please point me right direction if i have missed any.

hjalmers commented 6 years ago

Could you post an example of the data you have in your table? It shouldn't shuffle the rows unless it for some reason have a hard time determining the right sort order.

hjalmers commented 6 years ago

I thought about this some more and came up with a solution if the table has no unique property to sort by. For example, if sorted by gender the table will "shuffle" the data around as there's no natural order sorting a table with values like this. Any record might end up at the top unless we always use the start order.

Name Gender
Anna Female
Sara Female
Emma Female