Skip to content

Commit

Permalink
fix sort mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
bcolloran committed Sep 13, 2023
1 parent 28b93f7 commit 516063e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web-common/src/features/dashboards/dashboard-stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,10 @@ const metricViewReducers = {
switch (contextColumn) {
case LeaderboardContextColumn.DELTA_ABSOLUTE:
case LeaderboardContextColumn.DELTA_PERCENT: {
// if there is no time comparison, then we can't show
// these context columns, so return with no change
if (metricsExplorer.showComparison === false) return;

metricsExplorer.leaderboardContextColumn = contextColumn;
break;
}
Expand Down Expand Up @@ -686,7 +689,7 @@ function sortTypeForContextColumnType(
const sortType = {
[LeaderboardContextColumn.DELTA_PERCENT]: SortType.DELTA_PERCENT,
[LeaderboardContextColumn.DELTA_ABSOLUTE]: SortType.DELTA_ABSOLUTE,
[LeaderboardContextColumn.PERCENT]: SortType.DELTA_ABSOLUTE,
[LeaderboardContextColumn.PERCENT]: SortType.PERCENT,
[LeaderboardContextColumn.HIDDEN]: SortType.VALUE,
}[contextCol];

Expand Down

0 comments on commit 516063e

Please sign in to comment.