浏览代码

Update bootstrap-table-group-by.js

文翼 5 年之前
父节点
当前提交
30bf97bfaa
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/extensions/group-by-v2/bootstrap-table-group-by.js

+ 2 - 2
src/extensions/group-by-v2/bootstrap-table-group-by.js

@@ -152,8 +152,8 @@ BootstrapTable.prototype.initBody = function (...args) {
 
       let formattedValue = item.name
 
-      if (!(that.options.groupByFormatter === undefined)) {
-        formattedValue = Utils.calculateObjectValue(item, that.options.groupByFormatter, [item.name, item.id, item.data])
+      if (that.options.groupByFormatter !== undefined) {
+        formattedValue = Utils.calculateObjectValue(that.options, that.options.groupByFormatter, [item.name, item.id, item.data])
       }
       html.push('<td',
         Utils.sprintf(' colspan="%s"', visibleColumns),