浏览代码

pass field to noEditFormatter (#6223)

Co-authored-by: zhixin <wenzhixin2010@gmail.com>
Alberto Fanjul 3 年之前
父节点
当前提交
68d0f40502
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/extensions/editable/bootstrap-table-editable.js

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

@@ -63,7 +63,7 @@ $.BootstrapTable = class extends $.BootstrapTable {
 
       column.formatter = column.formatter || (value => value)
       column._formatter = column._formatter ? column._formatter : column.formatter
-      column.formatter = (value, row, index) => {
+      column.formatter = (value, row, index, field) => {
         let result = Utils.calculateObjectValue(column, column._formatter, [value, row, index], value)
 
         result = typeof result === 'undefined' || result === null ? this.options.undefinedText : result
@@ -86,7 +86,7 @@ $.BootstrapTable = class extends $.BootstrapTable {
           column.editable, [index, row], {})
 
         if (editableOpts.hasOwnProperty('noEditFormatter')) {
-          noEditFormatter = editableOpts.noEditFormatter(value, row, index)
+          noEditFormatter = editableOpts.noEditFormatter(value, row, index, field)
         }
 
         if (noEditFormatter === false) {