I am currently working with a mat-table and facing an issue. Here is the link to my table: https://stackblitz.com/run?file=src/app/table-dynamic-array-data-example.ts . I want to implement pagination for this table, but the dataSource structure differs from another example linked here: https://stackblitz.com/run?file=src/app/table-pagination-example.ts
dataSource = new MatTableDataSource<PeriodicElement>(ELEMENT_DATA); //not like this
Instead, it is structured as: dataSource: tableElement[];
I have attempted to add pagination using this code:
this.dataSource.paginator = this.paginator
however, I encountered the error message 'Property 'paginator' does not exist on type 'tableElement[]'. (tableElement being a type created by me). Any suggestions on how I can successfully add pagination to this type of table?