I was wondering if there was any way to filter an already filtered store. Let's say I've got an grid and two filters(F1 & F2). For now, what I'm doing is
if(!F1 & !F2)
{
grid.store.load().filterBy(function(record, id){
/*** My function to sort the entire store ***/
}, this);
}
else if(F1 & !F2){
grid.store.load().filterBy(function(record, id){
/*** My function to sort the entire store ***/
}, this);
}
else if (!F1 & F2) {
grid.store.load().filterBy(function(record, id){
/*** My function to sort the entire store ***/
}, this);
}
else if (F1 & F2){
grid.store.load().filterBy(function(record, id){
/*** My function to sort the entire store ***/
}, this);
}
I'm adding more and more filters for that grid and the number of 'else if
' is increasing in a exponential way...
Furthermore, I'm filtering on 150k+ records so reseting && filtering on all records at any change can be pretty expensive.
What I'd like is
if (F1){
/** filter on the most recent version of the grid **/
}
if (F2){
/** filter on the most recent version of the grid **/
}
Hope I am clear, thank you.