diff --git a/src/extensions/editable/bootstrap-table-editable.js b/src/extensions/editable/bootstrap-table-editable.js
index efd97cf56b..38f4ca949a 100644
--- a/src/extensions/editable/bootstrap-table-editable.js
+++ b/src/extensions/editable/bootstrap-table-editable.js
@@ -48,7 +48,6 @@ $.BootstrapTable = class extends $.BootstrapTable {
}
const editableOptions = {}
- const editableDataMarkup = []
const editableDataPrefix = 'editable-'
const processDataOptions = (key, value) => {
// Replace camel case with dashes.
@@ -77,26 +76,26 @@ $.BootstrapTable = class extends $.BootstrapTable {
$.each(column, processDataOptions)
- $.each(editableOptions, (key, value) => {
- editableDataMarkup.push(` ${key}="${value}"`)
- })
-
- let noEditFormatter = false
const editableOpts = Utils.calculateObjectValue(column,
column.editable, [index, row], {})
+ const noEditFormatter = editableOpts.hasOwnProperty('noEditFormatter') &&
+ editableOpts.noEditFormatter(value, row, index, field)
- if (editableOpts.hasOwnProperty('noEditFormatter')) {
- noEditFormatter = editableOpts.noEditFormatter(value, row, index, field)
+ if (noEditFormatter) {
+ return noEditFormatter
}
- if (noEditFormatter === false) {
- return ``
- }
- return noEditFormatter
+ let editableDataMarkup = ''
+
+ $.each(editableOptions, (key, value) => {
+ editableDataMarkup += ` ${key}="${value}"`
+ })
+
+ return `${result}` // expand all data-editable-XXX
}
})
}