Seems easy enough but after hours and hours of wasted time I must ask.
I have a nested dataview list with a store that gets populated from an api. Each record is neat and and easy to parse. Like this:
title: 'some title'
starred: false // some are "starred: true" and thats what I want
state: 1
statetyped: 1
I simply need to tap a button that says "starred" and filter the list to show just the starred items.
I have tried everything under the sun, including:
sto.filterBy(function(record){
var title = record.get('starred');
if(title == "true" || title == true)
return record;
});
//doesnt work
sto.filter(function (record) {
if (record.data.starred == true) {
return record;
}
});
//same, doesn't work
I even got desperate and filtered the list with underscore.js, created a new store and tried to load the new store, but to no avail.
The console error is: Uncaught TypeError: Cannot call method 'detach' of null (Default.js?_dc=1392147674804:140)
If it helps:
my dataview view: http://jsfiddle.net/8ycnR/
list controller: http://jsfiddle.net/a7ZaX/