Jacobian
Jacobian

Reputation: 10812

Unable to create simple TreePanel at Sencha Fiddle

I tried to reproduce my local problem at Sencha Fiddle and created a small example, but the problem is, it seems like it is impossible to load local json files there. I'm not sure what I'm doing wrong and why my demo example is not working. By the way, this example was supposed to demonstrate that treepanel does not load all data, but for some reason it skips some leaves.

Upvotes: 0

Views: 275

Answers (1)

Tyr
Tyr

Reputation: 2810

Sencha Fiddle has some weird behavior when it comes to mock data since on start it will cause a 404 error in the network tab.

I suggest you to implement a button in your fiddle to load the store via click:

Ext.create('Ext.button.Button', {
    renderTo: Ext.getBody(),
    text: 'Load Data',
    handler: function() {
        // id: 'tree', in Ext.tree.Panel
        Ext.getCmp('tree').getStore().load();
    }
});

Upvotes: 1

Related Questions