Opened 8 years ago

Closed 6 years ago

#17508 closed enhancement (patchwelcome)

sorting on a MemoryStore

Reported by: nhardy Owned by: Kris Zyp
Priority: undecided Milestone: 1.11
Component: Data Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:


I have experienced this a few times now. When sorting on a Memory store through a query, the sort only works when placing it in an array. The store should be able to handle the sort even when it isn't in an array.

ie This doesn't work - store.query({}, {sort: {attribute: "id", descending:false}}).forEach(

lang.hitch(this, function(item){

do something



but this does - store.query({}, {sort: [{attribute: "id", descending:false}]}).forEach(

lang.hitch(this, function(item){

do something



Change History (3)

comment:1 Changed 8 years ago by ben hockey

Type: defectenhancement

this is not a defect - it's an enhancement request but it's possible it may be rejected.

comment:2 Changed 8 years ago by bill

Component: GeneralData
Owner: set to Kris Zyp

comment:3 Changed 6 years ago by dylan

Milestone: tbd1.11
Resolution: patchwelcome
Status: newclosed

Sorting has been improved in . Would accept a pull request to make this change to dojo/store if still desired.

Note: See TracTickets for help on using tickets.