I have a TreeStore and a TreeModel and want the TreeModel to allow checks in certain situations. Simple solution would be to have 2 different models but I'm trying to figure out how to use one. So far I haven't been able to do that. I want to be able to set the checked default to either false or null from store config. Any ideas?
Pass model config from store?
Code:
extend: 'Ext.data.TreeModel',
fields: [
{name: 'leaf', type: 'bool', calculate: function(data) {
return !data.root && !data.children;
}},
{name: 'checked', type: 'bool', default: false} // Want false or null here
]
Pass model config from store?
Aucun commentaire:
Enregistrer un commentaire