ソースを参照

editable columns error when refreshOptions (#2123)

luryson 9 年 前
コミット
171873e487
1 ファイル変更5 行追加2 行削除
  1. 5 2
      src/extensions/editable/bootstrap-table-editable.js

+ 5 - 2
src/extensions/editable/bootstrap-table-editable.js

@@ -60,9 +60,12 @@
 
             $.each(that.options, processDataOptions);
 
-            var _formatter = column.formatter;
+            column.formatter || column.formatter = function (value, row, index) {
+                return value;
+            };
+            column._formatter = column._formatter? column._formatter: column.formatter;
             column.formatter = function (value, row, index) {
-                var result = _formatter ? _formatter(value, row, index) : value;
+                var result = column._formatter? column._formatter(value, row, index): value;
 
                 $.each(column, processDataOptions);