webismymind / editablegrid

EditableGrid is an open source Javascript library aimed at turning HTML tables into advanced editable components. It focuses on simplicity: only a few lines of code are required to get your first table up and running.
http://www.editablegrid.net
Other
795 stars 272 forks source link

info about column sorted #12

Closed markux closed 13 years ago

markux commented 13 years ago

In callback tableSorted any parameters regarding the sorted column.

in editablegrid.js row 1219, this change:

// callback tableSorted(columnIndexOrName, descending);

(PS: how do I update the file compressed with this change?)

thanks

webismymind commented 13 years ago

Hello,

This can be useful only when the sort function has been called "manually" on a column name. If the column has been sorting by clicking on a column header, you could use "this.sortedColumnName" and "this.sortDescending" in your callback. But you're right, it's better to have these parameters in the callback since it covers all cases. I just pushed the change to the master branch, only changing "columnIndexOrName" to "columnIndex" (so your callback knows it gets a column index, not a name).

Regarding the compressed file: we are building it with a script and this script is not yet part of the delivery but it will be in the next release...

Regards