Roo/data/Store.js
authoredward <edward@roojs.com>
Mon, 9 Nov 2015 07:03:30 +0000 (15:03 +0800)
committeredward <edward@roojs.com>
Mon, 9 Nov 2015 07:03:30 +0000 (15:03 +0800)
Roo/data/Store.js

index 9121cee..ccc5188 100644 (file)
@@ -601,13 +601,17 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, {
             fn.push(this.createFilterFn(p, value, false));
         });
         
-        if(!fn.length){
+        if(!fn.length && !afn.length){
             return this.clearFilter();
         }
+        
         var filterData = [];
         
         var data = this.snapshot || this.data;
         
+        Roo.each(fn, function(f){
+            filterData.push(this.queryBy(fn, scope || this));
+        });
         
         this.data = this.queryBy(fn, scope||this);
         
@@ -623,7 +627,6 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, {
     filterBy : function(fn, scope){
         this.snapshot = this.snapshot || this.data;
         this.data = this.queryBy(fn, scope||this);
-        Roo.log(this.data);
         this.fireEvent("datachanged", this);
     },