cmglez10 / ng-datatable

DataTable - Simple table component with sorting and pagination for Angular2
8 stars 5 forks source link

reset the sorting order #10

Open kiranirabatti opened 5 years ago

kiranirabatti commented 5 years ago

I have used mfDefaultSorter on each column to sort by the same. Now when I sorted using a column it preserves that order until I left that component, and when I come to the same component again then it shows in retested order. Now I want to reset the sorting order manually from typescript, how can I do that?? Can you please help me out on this. I have tried with mfSortBy and mfSortOrder, both are not working or I have used it in wrong way. Please help me...

cmglez10 commented 5 years ago

You can always re-order the array [mfData] and it will be shown as you built it when component is shown for the first time.