ソースを参照

IE8 safe method for searching array, also returning if id is not in the data array

Said Ketchman 10 年 前
コミット
abaec11e69
1 ファイル変更5 行追加1 行削除
  1. 5 1
      src/bootstrap-table.js

+ 5 - 1
src/bootstrap-table.js

@@ -2200,7 +2200,11 @@
             return;
         }
 
-        rowId = this.options.data.indexOf(this.getRowByUniqueId(params.id));
+        rowId = $.inArray(this.getRowByUniqueId(params.id), this.options.data);
+
+        if (rowId === -1) {
+            return;
+        }
 
         $.extend(this.data[rowId], params.row);
         this.initSort();