()
| 878 | @ViewChild(MatSortHeader) sortHeader!: MatSortHeader; |
| 879 | |
| 880 | constructor() { |
| 881 | this.underlyingDataSource.data = []; |
| 882 | |
| 883 | // Add three rows of data |
| 884 | this.underlyingDataSource.addData(); |
| 885 | this.underlyingDataSource.addData(); |
| 886 | this.underlyingDataSource.addData(); |
| 887 | |
| 888 | this.underlyingDataSource.connect().subscribe(data => { |
| 889 | this.dataSource.data = data; |
| 890 | }); |
| 891 | } |
| 892 | |
| 893 | ngAfterViewInit() { |
| 894 | this.dataSource.sort = this.sort; |