Hi all,
My team has implemented the sorting on the search grid of the Registration module according to a few selected headers.
This has been a requirement of a few of our clients because of the huge number of records being present and the difficulty to find for the desired record.
This sorting is implemented to view the search results in either ascending or descending order according to the header selected. The headers in blue (refer to the attached image below) have the ability to sort the results in both ways.
For this, we used an external library for sorting which is GitHub - linagora/angularjs-naturalsort: [ARCHIVED] and the logic for sorting. This external library is used to perform natural sorting on the data that was returned from the search query. Then the sorting library was applied as a angularjs filter on the search grid.
Sorting of the search grid for the headers ID, Name, Middle Name, Last Name, Gender, Birth date and Age.