Skip to content

Commit

Permalink
Fix sorting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisronline committed Sep 25, 2019
1 parent 93df33f commit d633131
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ export class MonitoringViewBaseEuiTableController extends MonitoringViewBaseCont
}

setSorting(sort) {
this.sorting = sort || {
sort: {
field: 'name',
direction: EUI_SORT_ASCENDING
}
};
this.sorting = sort || { sort: {} };

if (!this.sorting.sort.field) {
this.sorting.sort.field = 'name';
}
if (!this.sorting.sort.direction) {
this.sorting.sort.direction = EUI_SORT_ASCENDING;
}
}

setQueryText(queryText) {
Expand Down

0 comments on commit d633131

Please sign in to comment.