Hi everyone, i'm a bit new on Sencha touch and I'm still learning the ropes.
I've searched for an answer to my question but haven't found it so here it goes:
I have a dataview.list + a store (localstorage) .
I want to apply apply that store to a view, but filtered.
The list:
Code:
Ext.define("App.view.NotesList", {
extend: "Ext.dataview.List",
xtype: "noteslist",
config: {
iconCls: 'list',
title: 'Tasks',
items: [
{
xtype: "titlebar",
title: 'Tasks',
docked: "top",
items: [
{
text: 'New',
ui: 'action',
handler: this.onNewButtonTap,
scope: this,
align: "right"
}
]
}
],
loadingText: "Loading Tasks...",
emptyText: '<div class="notes-list-empty-text">No tasks found.</div>',
onItemDisclosure: false,
store: "Tasks",
grouped: true,
itemTpl: '<div class="list-item-title">{title}</div>' +
'<div class="list-item-time">{formattedTime}</div>' +
'<div class="list-item-narrative">{description}</div>'
,
},
});
And the filter I want to apply:
Code:
filters: [
{
property: 'complete',
value : false
}
],
I' not sure on how to do this, ideally I'll want to define the store there and add the filters, but as I'm only using the reference name, I'm not sure how to accomplish this.
I also tried having two separate stores, each with filters, but doesn't really apply to what I'm trying to do.
Thanks in advance!