PDA

View Full Version : Treelist lost style



slan
6 Apr 2016, 10:22 AM
Hi, all.
I have a newbie question: why in my application treelist is not styled as treelist?

54313

Gary Schlosberg
6 Apr 2016, 11:13 AM
Can you please post the code you used to generate this output?

slan
6 Apr 2016, 10:54 PM
The application is so large. This is fragment:

Ext.define("App.view.report.List",{
extend: "Ext.panel.Panel",
xtype: 'reportlist',

requires: [
"App.view.report.ListController",
"App.view.report.ListModel"
],


controller: "report-list",
viewModel: {
type: "report-list"
},



items:[{
xtype: 'treelist',
bind: '{reportItems}'
}]


});

Ext.define(App.view.report.ListModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.report-list',

stores:{
reportItems:{
type: 'tree',
root: {
expanded: true,
children: [
{ text: 'detention', leaf: true },
{ text: 'homework', expanded: true, children: [
{ text: 'book report', leaf: true },
{ text: 'algebra', leaf: true}
] },
{ text: 'buy lottery tickets', leaf: true }
]
}
}
}


});



Then the 'reportlist' is placed on 'panel'.

Gary Schlosberg
19 Apr 2016, 4:03 PM
Are you hoping for it to look more like the example here?
http://examples.sencha.com/extjs/6.0.1/examples/kitchensink/#tree-list

Are you using a theme? If you are wanting different icons, you'll want to set the iconCls in your data is in the example.

alexander.urban
20 Apr 2016, 12:58 AM
Please try to let Sencha Cmd run through. The uncompiled version of your app requires the compiled version of the style sheets. If you haven't recompiled the app after you added a new dependency, that dependency's styles are not part of your compiled stylesheet.