lorenzofox3 / Smart-Table

Code source of Smart Table module: a table/grid for Angularjs
http://lorenzofox3.github.io/smart-table-website/
1.8k stars 513 forks source link

Sort Question (Secondary sort criteria) #795

Open nizarl opened 7 years ago

nizarl commented 7 years ago

This is only a question. -Thanks in advance.

How would you recommend to use the sort getter if there is a primary and secondary sort.

Example: If the below criteria has 2 of the same values I would like to use another value to do secondary sort. Both values are available inside this function.

In this example if firstName is the same I would like secondary sort by age.

scope.getters={ firstName: function (value) { return value.firstName; } }