View Full Version : Why on node append to TreeStore leaf property not change?

5 Apr 2014, 3:04 PM
When we append a node in another node that was a leaf, I think it should not be a leaf any more, however this doesn't happen! Why?

Ext: 4.2.1

var tree = Ext.create('Ext.data.TreeStore',{
fields: [{name: 'text'}],
proxy: {
type: 'memory',
data: [ {id: 1, text: 'test', leaf: true}]

tree.load({callback: function(){
var node = tree.getNodeById( 1 );
console.log( node.isLeaf() );
node.appendChild({id: 2, text: 'test 2', leaf: true});
console.log( node.isLeaf() );

Gary Schlosberg
5 Apr 2014, 4:34 PM
Looks like a bug, but it seems to have been fixed. I was able to reproduce the issue using your code with 4.2.1 and 4.2.2, but the test case behaved as expected against the latest nightly releases of 4.2.3 and 5.0.0.

5 Apr 2014, 5:09 PM
I was wondering if it was a bug :), now I know. TY