Is there a way to properly pass the object received in the @Input() data
(Child Component) to the dataSource
? The current method I'm using doesn't seem to work as expected. An example of my approach can be found at this link:
@Input() data:PeriodicElement[];
dataSource = new MatTableDataSource<PeriodicElement>(this.data);
@ViewChild(MatPaginator, {static: true}) paginator: MatPaginator;
constructor() { }
ngOnInit() {
this.dataSource.paginator = this.paginator;
// console.log(this.dataSource)
}