Opened 10 years ago

Closed 6 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:


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

    ], function(Memory, Observable) {
    var numItems = 10;
    var data = [];
    for (var i = 0; i < numItems; i++) {
            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)

sliceable-store-results.diff (7.2 KB) - added by Kris Zyp 9 years ago.
Patch for sliceable query results

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 years ago by Justin Doherty

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.

comment:2 Changed 10 years ago by bill

Component: GeneralData
Owner: set to Kris Zyp

Changed 9 years ago by Kris Zyp

Patch for sliceable query results

comment:3 Changed 8 years ago by dylan

I believe this was fixed in 1.9. Kris, can you verify please?

comment:4 Changed 6 years ago by dylan

Milestone: tbd1.9
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.