PDA

View Full Version : [OPEN] [4.2.1] TreeStore: parentId changes are not reflected by getCahnges() method



realgaa
25 Oct 2013, 6:31 AM
Please take a look at test case here:
http://fiestadev.bryntum.com/#253-treestore-parentid-changes-aren-t-reflected-by-getchanges-method

https://fiddle.sencha.com/#fiddle/174

And here is the same scenario for local environment usage:

var store = Ext.create('Ext.data.TreeStore', {
fields : [ 'id', 'name' ],
root : {}
});

var root = store.getRootNode();
// init store data
var node1 = root.appendChild({ id : 1 });
var node2 = root.appendChild({ id : 2 });
node1.commit();
node2.commit();


// here we change parent of node2 from root to node1
node1.appendChild(node2);


// and now we expect to find parentId in getChanges() result
if (node2.getChanges().parentId != node2.data.parentId) {
throw 'Wrong parentId in the changed fields '+
'(expected "'+node2.data.parentId+'" but found "'+node2.getChanges().parentId+'")';
}

Gary Schlosberg
25 Oct 2013, 8:52 AM
Thanks for the report! I have opened a bug in our bug tracker.

mankz
10 Dec 2014, 2:34 AM
Not reproducible in 5.x