I am using angular material to display data in table with pagination, when the user clicks on a row, I redirect him to another page, and if he wants to go back to table page, he clicks on a button.
My problem is the user needs to go back to table page and to scroll to the specific row, I do it like this
document.getElementById(elementId).scrollIntoView()
but if the row clicked is not in the first page, the element is not found, how can I paginate to the page where the row exists ?
And the second problem is user can filter table then select a specific row, if I save the page number, when he will go back to table page, the data will be rendered without filter and the page number will not be correct