I am trying to create dynamic table component using Mat Table. I am passing column names and data as input to this component. But when I am changing the column names and data, the table is not refreshing. What am I missing here?
I have now resolved this issue by calling change detection manually in ngOnChanges() setTimeout(() => this.cdr.detectChanges());
selector: 'mat-table, table[mat-table]',
exportAs: 'matTable',
template: CDK_TABLE_TEMPLATE,
styleUrls: ['table.css'],
host: {
'class': 'mat-table',
}