#2739 closed enhancement (wontfix)
FilteringTable.columns[i].sortFunction - KISS, one-liner
Reported by: | guest | Owned by: | Tom Trenka |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.4.2 |
Keywords: | FilteringTable sortFunction sortusing | Cc: | |
Blocked By: | Blocking: |
Description (last modified by )
[ Dojo 0.4.2 ] I can deal with an dojoAddOnLoad like this:
var filteringTable = dojo.widget.byId ('filteringTableId'); var myKradSortFunction = function (a, b, direction) { ... } filteringTable.columns[0].sortFunction = myKradSortFunction;
It is not as elegant is it should be, but it is straight-forward. I really shouldn't have to walk into your house and raid the fridge when I want to borrow a cup of milk... For another day...
This allows me to build the FilteringTable? from markup, which vastly simplifies my life. CSS headaches, etc...
So if everyone else insists on making things more complicated then they {need to/should} be, here's a patch for the little guy.
--- FilteringTable.js.original 2007-04-13 13:09:44.000000000 -0400 +++ FilteringTable.js 2007-04-13 13:09:54.000000000 -0400 @@ -427,6 +427,7 @@ } var a = self.store.getField(self.getDataByRow(rowA), field); var b = self.store.getField(self.getDataByRow(rowB), field); + if (meta.sortFunction && typeof meta.sortFunction == 'function') { return meta.sortFunction (a, b, dir); } /* PATCH */ var ret = 0; if (a > b) { ret = 1;
Attachments (1)
Change History (6)
Changed 14 years ago by
Attachment: | FilteringTable.js.patch added |
---|
comment:1 Changed 14 years ago by
Milestone: | 0.9M2 → 0.4.3 |
---|
comment:2 Changed 14 years ago by
Description: | modified (diff) |
---|---|
Owner: | changed from bill to Tom Trenka |
comment:4 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
More like invalid, because I'm not going to add the ability to pass in a direction; that's already taken care of by the createSorter method's execution.
Note: See
TracTickets for help on using
tickets.
Who submitted this? Is there a CLA?