Browse Source

Merge pull request #6283 from Ajohn10/FixAjohn10Tickets

Fix ajohn10 tickets
Dustin Utecht 3 years ago
parent
commit
86e94fc6e1

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

@@ -83,8 +83,9 @@ BootstrapTable.prototype.initSort = function (...args) {
       const groupByFields = this.getGroupByFields()
       const groupByFields = this.getGroupByFields()
       const groupValues = []
       const groupValues = []
 
 
-      $.each(groupByFields, (i, field) => {
-        groupValues.push(item[field])
+    $.each(groupByFields, (i, field) => {
+        let value_ = Utils.getItemField(item, field, that.options.escape, item.escape)
+        groupValues.push(value_)
       })
       })
 
 
       return groupValues.join(', ')
       return groupValues.join(', ')

+ 5 - 3
src/extensions/print/bootstrap-table-print.js

@@ -133,11 +133,13 @@ $.BootstrapTable = class extends $.BootstrapTable {
     })
     })
   }
   }
 
 
-  doPrint (data) {
-    const formatValue = (row, i, column) => {
+    doPrint(data) {
+      var _this2 = this
+      const formatValue = (row, i, column) => {
+      let value_ = Utils.getItemField(row, column.field, _this2.options.escape, column.escape);
       const value = Utils.calculateObjectValue(column,
       const value = Utils.calculateObjectValue(column,
         column.printFormatter || column.formatter,
         column.printFormatter || column.formatter,
-        [row[column.field], row, i], row[column.field])
+        [value_, row, i], value_)
 
 
       return typeof value === 'undefined' || value === null ?
       return typeof value === 'undefined' || value === null ?
         this.options.undefinedText : value
         this.options.undefinedText : value