I created an instance of MatTableDataSource then added data to it and bind it to mat-table. Later I applied filter to this datasource and it showed filtered rows in the mat-table. How can I get these filtered rows in code.
If the MatTableDataSource
and filter field are bound properly, you can get filtered records like so:
var filteredData = this.dataSource.filteredData;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With