tabalinas / jsgrid

Lightweight Grid jQuery Plugin
http://js-grid.com
MIT License
1.52k stars 352 forks source link

[Bug Reports] - SortingStrategies #1367

Open maurorulli opened 3 years ago

maurorulli commented 3 years ago

The documentation about custom sorting strategy says: jsGrid.sortStrategies.client = function(index1, index2) { var client1 = clients[index1]; var client2 = clients[index2]; return client1.Name.localeCompare(client2.Name) || client1.Age - client2.Age; }; It seems that the args of the function are indexes of the data array, but running it I got the values to compare. Does the documentation need to be edited or is a code bug?