Utilizing angular material, I have set up a table with pagination for displaying data. When a user clicks on a row, they are redirected to another page. To return to the table page, they must click on a button.
The issue arises when the user needs to return to the table page and scroll to the specific row. Currently, this is done using:
document.getElementById(elementId).scrollIntoView()
If the clicked row is not on the first page, the element cannot be found. How can I paginate to the correct page where the row exists?
Furthermore, another problem occurs when a user filters the table and selects a row. If I save the page number, the data will render without the filter applied, causing the page number to be incorrect upon returning to the table page.