Browse Source

Fix methods updateRow and updateByUniqueId which didn't update the right data when a search is active

David Maison 9 years ago
parent
commit
5d2f684c48
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/bootstrap-table.js

+ 4 - 2
src/bootstrap-table.js

@@ -2392,9 +2392,10 @@
             if (rowId === -1) {
                 return;
             }
-            $.extend(that.data[rowId], params.row);
+            $.extend(that.options.data[rowId], params.row);
         });
 
+        this.initSearch();
         this.initSort();
         this.initBody(true);
     };
@@ -2418,9 +2419,10 @@
             if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) {
                 return;
             }
-            $.extend(that.data[params.index], params.row);
+            $.extend(that.options.data[params.index], params.row);
         });
 
+        this.initSearch();
         this.initSort();
         this.initBody(true);
     };