On the grid the sort seems to be working fine.
But when I am doing the next search after clearing the results in the grid the sort function is not resetting.
clear() {
this.firstName = "";
this.lastName = "";
localStorage.removeItem("firstName");
localStorage.removeItem("lastName");
this.orgName = "";
this.rowData = [];
this.filteredRowCount = 0;
// this.grid.filterService.clear();
this.grid.filter = undefined;
this.grid.sort = [];
this.state.sort = [];
const emptySortState: DataStateChangeEvent = {
sort: [],
skip: 0,
take: this.pageSize
};
this.onDataStateChange(emptySortState);
this.grid.data = this.rowData;
this.grid.columns.forEach((column: ColumnComponent) => {
column.filter = undefined;
})
this.filter = { logic: 'and', filters: [] };
}