Wait! Looks like we don't have enough information to add this to bug database. Please follow this
template bug format.
-
Sencha User
touch-charts-2.0.0-beta - TreeStore [BUG]
Using Sencha Touch 2.0.1.1 with touch-charts-2.0.0-beta package
I found the following bug in the Ext.data.TreeStore object :
in an attempt to insert a new child node, the new node is correctly inserted under the parent node
but is replicated under the root node.
Here is the sample code:
Ext.define ('ListItem', {
extend: 'Ext.data.Model',
config: {
fields: ['text']
}
});
var data = {id: 'root', items: [{id: 'x1', text: 'Item1'},
{id: 'x2', text: 'Item2'},
{id: 'x3', text: 'Item3'}]};
var treeStore = Ext.create ('Ext.data.TreeStore', {
model: 'ListItem',
defaultRootProperty: 'items',
root: data
});
...
treeStore.getRoot (). findChild ('id', 'x1', false)
.appendChild ({text: 'SubItem1', leaf: true});
The new 'SubItem1' node is correctly entered under the 'Item1' node but is incorrectly replicated under the 'root' node
Thanks in advance.
-
Have you tried this in a later release?
Also, Touch Charts 2 beta is really deprecated in favor of the rewrite in Sencha Touch 2.1.0 b1/2/3
-
Sencha User
With the "Sencha Touch 2.1.0 b3", the problem does not occur,
but I wanted to delay the release upgrade.
Thanks anyway!