2016-10-04 120 views
0

我有我可以过滤网格的文本框,问题是它不能过滤所有列,但只有其中一个,所以我想过滤所有列的文本框输入任何值,甚至它是type or name or email or something,就像一个gridsearch。我的代码感谢Extjs 6-过滤网格

片段:

xtype: 'textfield', 
label: 'search', 
emptyText: 'Enter type...', 
listeners: { 
      change: function (field, value) { 
        var grid = this.up('grid'), 
         store = grid.getStore(); 
         if (!value) { 
          store.getFilters().removeAll(); 
         } else { 
          store.filter([{property:'type',//can be other property 
              value:value}]); 
          } 
         } 
        } 

回答