Table with server side pagination: reset to first page while searching?

How can I reset the table to reach on the first page while search results are getting updated on the table?

e.g. As currently when the user was on page 6 and tried to search but based on search it might result in fewer pages maybe 1 or 2 at that time there seems no data on the result as a user on page 6.

I might want the user to lead to page 1 so they can see any results if available.

Hey @jignesh! You can use your table’s .selectPage property to reset the page when you run whatever query is backing your search. One way to do that would be to write a JS Code query that runs table1.selectPage(1) and trigger it to run immediately after your search query. Does that help?

Thanks @justin
Seems like this property will help.

1 Like