Relative Content

Tag Archive for javascriptangulartypescriptangular-material

How to make checkbox selected on mat-table page change?

I’m developing a table using Angular Material where user can also select the rows using checkboxes. So far the logic is working fine when the table has all data and changing of pagination doesn’t effect the selections. But when I moved to server side pagination, the dataSource has become dynamic and the checkbox selections not rendering in view again when going back to the previous/next page that have the rows selected. I’ve checked that the selection.selected is holding the value even on page change but why it’s not showing in view that’s the question.