すでにフィルタリングされたストアをフィルタリングする方法があるかどうか疑問に思っていました。グリッドと 2 つのフィルター (F1 と F2) があるとします。とりあえずやっていることは、
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);
}
そのグリッドにフィルターをどんどん追加していて、「 」の数がelse if
指数関数的に増加しています... さらに、15 万件以上のレコードをフィルター処理しているため、変更時にすべてのレコードの && フィルター処理をリセットすると、かなりのコストがかかる可能性があります。
私が欲しいのは
if (F1){
/** filter on the most recent version of the grid **/
}
if (F2){
/** filter on the most recent version of the grid **/
}
私が明確であることを願っています、ありがとう。