dynamic pagination & sorting updates
This commit is contained in:
parent
1fcd1829f9
commit
d229c9c447
@ -33,8 +33,15 @@ export class ContactsComponent {
|
|||||||
|
|
||||||
@Output() hasContacts = new EventEmitter<boolean>();
|
@Output() hasContacts = new EventEmitter<boolean>();
|
||||||
|
|
||||||
@ViewChild(MatPaginator) paginator!: MatPaginator;
|
@ViewChild(MatPaginator, { static: false })
|
||||||
@ViewChild(MatSort) sort!: MatSort;
|
set paginator(value: MatPaginator) {
|
||||||
|
this.dataSource.paginator = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ViewChild(MatSort, { static: false })
|
||||||
|
set sort(value: MatSort) {
|
||||||
|
this.dataSource.sort = value;
|
||||||
|
}
|
||||||
|
|
||||||
displayedColumns: string[] = ['firstName', 'lastName', 'title', 'phone', 'mobile', 'email', 'actions'];
|
displayedColumns: string[] = ['firstName', 'lastName', 'title', 'phone', 'mobile', 'email', 'actions'];
|
||||||
dataSource = new MatTableDataSource<any>();
|
dataSource = new MatTableDataSource<any>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user