I have implemented accordion list by referring this link. http://docs.kawanoshinobu.com/touch/#!/api/Ext.ux.AccordionList . Accordion is working fine without any issues. I need to search text only on accordion list headers. After search, Once if got accordion headers. Should be, i able to expand and collapse those headers need to see the header child items. I have applied store filter, it is filtered store and displayed filtered data (refer image). expand and collapse is happening on header right and down icon is changing. but not able to see the child nodes data of particular header on expand mode. child nodes are available of that header(seen in console.log()). Is there any other way to apply filter for accordion list/tree store? Great appreciate. Thank you. in above link itself i have applied store filter it's behaviors same as what i am facing issue on my code. In below code i passing filter text 'to'. it is filtered today, very nice. but when click on expand child nodes are not visible.
code is here:
var data = {
"items" : [{
"text" : "Today",
"items" : [{
"text" : "Eat",
"leaf" : true
}, {
"text" : "Sleep",
"leaf" : true
}, {
"text" : "Drinking",
"leaf" : true
}]
}, {
"text" : "Tomorrow",
"items" : [{
"text" : "Watch TV",
"leaf" : true
}, {
"text" : "Watch Video",
"leaf" : true
}]
}, {
"text" : "This week",
"items" : [{
"text" : "Shopping",
"leaf" : true
}]
}, {
"text" : "Later",
"items" : [{
"text" : "Eat",
"leaf" : true
}, {
"text" : "Sleep",
"leaf" : true
}, {
"text" : "Drinking",
"leaf" : true
}]
}]
};
Ext.define('Task', {
extend: 'Ext.data.Model',
config: {
fields: [{
name: 'text',
type: 'string'
}]
}
});
var store = Ext.create('Ext.data.TreeStore', {
model: 'Task',
defaultRootProperty: 'items',
root: data
});
store.filter([{
property: "text",
value: "to",
anyMatch: true
}]);
var accordionList = Ext.create('Ext.ux.AccordionList', {
fullscreen: true,
store: store
});