浏览代码

use the undefinedText option

Dustin Utecht 6 年之前
父节点
当前提交
1e58595b3e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/extensions/editable/bootstrap-table-editable.js

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

@@ -57,8 +57,8 @@ $.BootstrapTable = class extends $.BootstrapTable {
       column.formatter = column.formatter || (value => value)
       column._formatter = column._formatter ? column._formatter : column.formatter
       column.formatter = (value, row, index) => {
-        const result = Utils.calculateObjectValue(column,
-          column._formatter, [value, row, index], value)
+        let result = Utils.calculateObjectValue(column, column._formatter, [value, row, index], value)
+        result = typeof result === 'undefined' || result === null ? this.options.undefinedText : result
 
         $.each(column, processDataOptions)