mattiash / angular-tablesort

Sort angularjs tables easily
MIT License
184 stars 66 forks source link

Add sorting support for track by $index #101

Closed rycornell closed 6 years ago

rycornell commented 7 years ago

This addresses an issue that exists today where the table is not sorted correctly. The following conditions must be met for this to occur:

The items should be sorted according to their index in the original array. However, that is not the case. Here is a plunk to reproduce the issue as well as the fix that I am submitting with this PR.

https://embed.plnkr.co/vnpmSm/

The fix I am proposing identifies the track by $index clause and sorts the data accordingly.

ChrisMBarr commented 6 years ago

@mattiash Any chance this could be merged in soon?

mattiash commented 6 years ago

Included in 1.6.0. Thanks for the patch!