Working on implementing the MatTableDataSource
to utilize the full functionality of the Material Data-Table,
but encountering issues.
Data is fetched from an API, stored in an object, and then used to create a new MatTableDataSource.
However, no data is being displayed on the page. When manually assigning the list to the HTML file instead of using MatTableDataSource,
the data becomes visible.
.ts code snippet
weekView: PlanningCalendarWeek = new PlanningCalendarWeek();
displayedColumnsWeek = this.buildDisplayedColumsWeek();
weekViewDataSource;
constructor(private dataService: DataService) {}
ngOnInit() {
this.getTimePhasing();
this.headerweekList = new Array<string>();
this.createHeadersForWeek();
this.weekViewDataSource = new MatTableDataSource(this.weekView.machineTypePlannings);
}