Skip to content

Commit a47b360

Browse files
committed
fix: do not take subtotals into account when sorting
1 parent 5fc2079 commit a47b360

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable

superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,10 @@ function createHierarchicalComparator(
249249
}
250250
return (sumA > sumB ? 1 : -1) * orderBasis;
251251
}
252-
if (depth + 1 < maxDepth && depth + 1 >= b.length) {
252+
if (depth + 1 <= maxDepth && depth + 1 >= b.length) {
253253
return topBasis;
254254
}
255-
if (depth + 1 < maxDepth && depth + 1 >= a.length) {
255+
if (depth + 1 <= maxDepth && depth + 1 >= a.length) {
256256
return -topBasis;
257257
}
258258

0 commit comments

Comments
 (0)