I have a page in which two table switches on a button call. When the page loads pagination is working fine but when I switch to another table and comes back to the previous