dbadke
2 May 2007, 1:41 PM
Ext 1.0.1a
I have a grid with a SimpleStore. Applying a filterBy to the store is not working. My code:
this.dataStore = new Ext.data.SimpleStore(
{fields: ['id', 'title', 'canDelete', 'updateStatus'],
data : [...]});
this.dataStore.filterBy(function(record, id) {return (record.get('updateStatus') != 'd')});
Looking at the Ext.data.store filterBy code in Firebug, I see this:
http://lettuce.tapor.uvic.ca/~dbadke/img/screenshot4.jpg
The 'data' variable is being set to this.snapshot or this.data. Firebug shows that this.data has items, and this.snapshot does not, yet the 'data' variable has been set to this.snapshot (see the inset in the image above). Of course there is no data there to filter, so nothing happens.
So... am I doing something silly? :"> Or misunderstanding the filterBy code? :-/ Or is this possibly a bug? :-?
I have a grid with a SimpleStore. Applying a filterBy to the store is not working. My code:
this.dataStore = new Ext.data.SimpleStore(
{fields: ['id', 'title', 'canDelete', 'updateStatus'],
data : [...]});
this.dataStore.filterBy(function(record, id) {return (record.get('updateStatus') != 'd')});
Looking at the Ext.data.store filterBy code in Firebug, I see this:
http://lettuce.tapor.uvic.ca/~dbadke/img/screenshot4.jpg
The 'data' variable is being set to this.snapshot or this.data. Firebug shows that this.data has items, and this.snapshot does not, yet the 'data' variable has been set to this.snapshot (see the inset in the image above). Of course there is no data there to filter, so nothing happens.
So... am I doing something silly? :"> Or misunderstanding the filterBy code? :-/ Or is this possibly a bug? :-?