浏览代码

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);