#3452 closed defect (wontfix)
FilteringTable sortFunction is unused
Reported by: | guest | Owned by: | Tom Trenka |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | General | Version: | 0.4 |
Keywords: | FilteringTable | Cc: | |
Blocked By: | Blocking: |
Description
Hi, I'm using version 0.4.3 of dojo. The FilteringTable? has an attribute called sortusing, to declare the function to sort the rows. This functio is never called. In my case i patch the function 'createSortFunction' like this
function createSortFunction(fieldIndex, dir) { var meta = self.columns[fieldIndex]; var field = meta.getField(); if( meta.sortFunction != null ) { return function (rowA, rowB) { if (dojo.html.hasAttribute(rowA, "emptyRow") ) return 1; if (dojo.html.hasAttribute(rowB, "emptyRow")) return -1; var a = self.store.getField(self.getDataByRow(rowA), field); var b = self.store.getField(self.getDataByRow(rowB), field); return dir * meta.sortFunction(a,b); } } return function (rowA, rowB) { ...
and it works fine.
Attachments (1)
Change History (5)
Changed 14 years ago by
Attachment: | FilteringTable.txt added |
---|
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Owner: | changed from anonymous to Tom Trenka |
---|
comment:3 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Filtering is dead, long live the king!
Note: See
TracTickets for help on using
tickets.
Replying to guest:
Hi. I had the same problems with dojo-0.4.3. I patched the createSorter-function a bit different for own sortFunctions like dateSorter or floatSorter. The attached file is my patch for discussion.
Rolf Metternich