Browse Source

Merge pull request #7214 from Naruto-kyun/patch-1

Fix set all parameters of sorter function from multi-sort extension
文翼 1 year ago
parent
commit
15fb28f40d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/extensions/multiple-sort/bootstrap-table-multiple-sort.js

+ 2 - 2
src/extensions/multiple-sort/bootstrap-table-multiple-sort.js

@@ -715,8 +715,8 @@ BootstrapTable.prototype.onMultipleSort = function () {
       const order = that.options.sortPriority[i].sortOrder === 'desc' ? -1 : 1
       let aa = Utils.getItemField(a, fieldName)
       let bb = Utils.getItemField(b, fieldName)
-      const value1 = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [aa, bb])
-      const value2 = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [bb, aa])
+      const value1 = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [aa, bb, a, b])
+      const value2 = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [bb, aa, b, a])
 
       if (value1 !== undefined && value2 !== undefined) {
         arr1.push(order * value1)