浏览代码

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

David Maison 9 年之前
父节点
当前提交
5d2f684c48
共有 1 个文件被更改,包括 4 次插入2 次删除
  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);
     };