Search with manual pagination and filtering
Hello I have datatable component that i use to render my data. Most of things are handle manually. I use
Tanstack Query
to fetch the tableData. I have a search state that i pass down to my table and i have two problems:
1. When i search i want to reset the pageIndex
to 0. When doing this a re-render happen for every keypress. Also when doing this an extra request occurs for pageIndex = 0
.
2. When typing (searching) the table components re-renders for every keystroke as the search value (prop) is changing.
How to handle both of them?0 Replies