ソースを参照

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