add sorting indicator (#15542)

This commit is contained in:
Alan Ren
2021-05-20 17:07:18 -07:00
committed by GitHub
parent 555e6a10e9
commit a5db46b961
2 changed files with 17 additions and 2 deletions

View File

@@ -625,11 +625,14 @@ export abstract class GridTableBase<T> extends Disposable implements IView {
}
if (this.state.sortState) {
const sortAsc = this.state.sortState.sortAsc;
const sortCol = this.columns.find((column) => column.field === this.state.sortState.field);
this.table.grid.setSortColumn(sortCol.id, sortAsc);
await this.dataProvider.sort({
multiColumnSort: false,
grid: this.table.grid,
sortAsc: this.state.sortState.sortAsc,
sortCol: this.columns.find((column) => column.field === this.state.sortState.field)
sortAsc: sortAsc,
sortCol: sortCol
});
}