Looking to create a dynamic table using Angular material where I can dynamically add or remove data. As a newcomer to Angular, I found the following StackBlitz helpful in setting up the table:
https://stackblitz.com/edit/angular-material-editable-table-fazhbc
While most of my changes have worked as expected, I am encountering an issue with sorting the data. Here is the code snippet causing the error:
ngAfterViewInit() {
this.dataSource.sort = this.matSort;
}
The error message I receive is: TS2339: Property 'sort' does not exist on type
'BehaviorSubject<AbstractControl[]
. Is sorting not supported in the material table data source, or am I overlooking something?