()
| 930 | @ViewChild(MatSort) sort!: MatSort; |
| 931 | |
| 932 | constructor() { |
| 933 | this.underlyingDataSource.data = []; |
| 934 | |
| 935 | // Add three rows of data |
| 936 | this.underlyingDataSource.addData(); |
| 937 | this.underlyingDataSource.addData(); |
| 938 | this.underlyingDataSource.addData(); |
| 939 | |
| 940 | this.underlyingDataSource.connect().subscribe(data => { |
| 941 | this.dataSource.data = data; |
| 942 | }); |
| 943 | } |
| 944 | |
| 945 | ngOnInit() { |
| 946 | this.dataSource!.sort = this.sort; |