Skip to content

Commit

Permalink
Merge pull request #362 from sunbird-cb/approval-filter-fix
Browse files Browse the repository at this point in the history
table sorting for work allocation
  • Loading branch information
venkykandagaddala authored Jan 1, 2024
2 parents 6e44fdb + f215b7f commit b7b5ef2
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ export class WorkAllocationTableComponent implements OnInit, OnChanges {
}
downloaddata: any = []
@ViewChild(MatPaginator, { static: true }) paginator!: MatPaginator
@ViewChild(MatSort, { static: true }) sort?: MatSort
// @ViewChild(MatSort, { static: true }) sort?: MatSort
@ViewChild(MatSort, { static: false }) set matSort(sort: MatSort) {
if (!this.dataSource.sort) {
this.dataSource.sort = sort
}
}

selection = new SelectionModel<any>(true, [])
constructor(
private router: Router, public dialog: MatDialog,
Expand All @@ -70,7 +76,7 @@ export class WorkAllocationTableComponent implements OnInit, OnChanges {
}
this.dataSource.data = this.data
this.dataSource.paginator = this.paginator
this.dataSource.sort = this.sort
// this.dataSource.sort = this.sort
this.viewPaginator = true
this.activatedRoute.params.subscribe(params => {
this.departmentRole = params['currentDept']
Expand Down

0 comments on commit b7b5ef2

Please sign in to comment.