Opened 9 years ago
Closed 5 years ago
#15227 closed defect (fixed)
Items modified at page boundaries of Observable wrapped store are treated as removed items
Reported by: | Justin Doherty | Owned by: | Kris Zyp |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9 |
Component: | Data | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Problem: If I modify an Item that is at a page boundary of an Observable wrapped store the observe callback treats it as a removed item, the insertedInto argument of the callback is -1.
I don't believe this is correct behaviour and I believe it has something to do with the atEnd variable on line 67 of Observable.js
require([ "dojo/store/Memory", "dojo/store/Observable" ], function(Memory, Observable) { var numItems = 10; var data = []; for (var i = 0; i < numItems; i++) { data.push({ id: i, label: "Label: " + i }); } var store = Observable(new Memory({ data: data })); var results = store.query(function() { return true; }, { start: 0, count: 5 }); results.observe(function(object, from, to) { console.log(object.label + " " + from + " " + to); }); store.put(results[results.length - 1]); });
Attachments (1)
Change History (5)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Component: | General → Data |
---|---|
Owner: | set to Kris Zyp |
Changed 8 years ago by
Attachment: | sliceable-store-results.diff added |
---|
Patch for sliceable query results
comment:4 Changed 5 years ago by
Milestone: | tbd → 1.9 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
I believe this and ticket:15228 are causing issues with the OnDemandGrid? in the dgrid module when modifying items that lie on page boundaries. These items disappear from the grid when they are edited.