Opened 7 years ago
Closed 5 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: |
Description
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 7 years ago by
Type: | defect → enhancement |
---|
comment:2 Changed 7 years ago by
Component: | General → Data |
---|---|
Owner: | set to Kris Zyp |
comment:3 Changed 5 years ago by
Milestone: | tbd → 1.11 |
---|---|
Resolution: | → patchwelcome |
Status: | new → closed |
Sorting has been improved in http://dstorejs.io/ . Would accept a pull request to make this change to dojo/store if still desired.
this is not a defect - it's an enhancement request but it's possible it may be rejected.