ソースを参照

Update updateCell method.

zhixin 10 年 前
コミット
e2152b5989
1 ファイル変更4 行追加2 行削除
  1. 4 2
      src/bootstrap-table.js

+ 4 - 2
src/bootstrap-table.js

@@ -2257,10 +2257,12 @@
     };
 
     BootstrapTable.prototype.updateCell = function (params) {
-        if (!params.hasOwnProperty('rowIndex') || !params.hasOwnProperty('fieldName') || !params.hasOwnProperty('fieldValue')) {
+        if (!params.hasOwnProperty('index') ||
+            !params.hasOwnProperty('field') ||
+            !params.hasOwnProperty('value')) {
             return;
         }
-        this.data[params.rowIndex][params.fieldName] = params.fieldValue;
+        this.data[params.index][params.field] = params.value;
         this.initSort();
         this.initBody(true);
     };