Browse Source

pass field to noEditFormatter (#6223)

Co-authored-by: zhixin <wenzhixin2010@gmail.com>
Alberto Fanjul 3 years ago
parent
commit
68d0f40502
1 changed files with 2 additions and 2 deletions
  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 || (value => value)
       column._formatter = column._formatter ? column._formatter : column.formatter
       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)
         let result = Utils.calculateObjectValue(column, column._formatter, [value, row, index], value)
 
 
         result = typeof result === 'undefined' || result === null ? this.options.undefinedText : result
         result = typeof result === 'undefined' || result === null ? this.options.undefinedText : result
@@ -86,7 +86,7 @@ $.BootstrapTable = class extends $.BootstrapTable {
           column.editable, [index, row], {})
           column.editable, [index, row], {})
 
 
         if (editableOpts.hasOwnProperty('noEditFormatter')) {
         if (editableOpts.hasOwnProperty('noEditFormatter')) {
-          noEditFormatter = editableOpts.noEditFormatter(value, row, index)
+          noEditFormatter = editableOpts.noEditFormatter(value, row, index, field)
         }
         }
 
 
         if (noEditFormatter === false) {
         if (noEditFormatter === false) {