Skip to content

Commit

Permalink
[ML] change sorting direction init
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Jun 30, 2021
1 parent 6f3d680 commit ca3400a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ export function getTopMetricsAggConfig(
AggFormComponent: TopMetricsAggForm,
/** Default name */
aggName: PIVOT_SUPPORTED_AGGS.TOP_METRICS,
aggConfig: {
sortSettings: {
order: 'desc',
},
},
aggConfig: {},
getEsAggConfig() {
// ensure the configuration has been completed
if (!this.isValid()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ export const usePivotConfig = (

if (suggestedSortField) {
config.aggConfig.sortField = suggestedSortField;
config.aggConfig.sortSettings = {};
config.aggConfig.sortSettings.order = 'desc';
}
}

Expand Down

0 comments on commit ca3400a

Please sign in to comment.