Ext Js 存储连接筛选器

Ext Js store joining filters

本文关键字:筛选 连接 存储 Js Ext      更新时间:2023-09-26

我想获取具有特定单词的记录,但该单词可以在任何字段中。

例如:

 { firstName: 'Ed',         lastName: 'Spencer'},
 { firstName: 'Spencer',    lastName: 'Ed'}

如果记录像上面这样,那么当我搜索斯宾塞时,应该返回两条记录。Ext js 在过滤器上应用过滤器。有没有办法独立应用商店过滤器。

做这样的事情:

store.filterBy(function(rec, id) {
  if (YOUR CONDITION CHECK ON REC)
    return true; //the record will be shown
  else
    return false; //the record will be filtered out
});