TanStackT
TanStack2y ago
2 replies
colossal-harlequin

My buttons lose focus when my `isLoading` state changes

I'm doing a little dummy project, and using react-query for the first time. Perhaps this isn't an issue of react-query at all, but I can't imagine what else it might be either. I have this component:

https://github.com/cssinate/sortable-table/blob/main/src/components/SortableTable/SortableTable.tsx

You can see from https://github.com/cssinate/sortable-table/blob/main/src/App.tsx that isSearching is just
isLoading
coming from react-query.

If I navigate the Pagination buttons using a keyboard, they lose focus. If I delete the code for the conditional isSearching render, that doesn't happen. I have no idea what's going on. Any ideas?
GitHub
Contribute to cssinate/sortable-table development by creating an account on GitHub.
sortable-table/src/components/SortableTable/SortableTable.tsx at ma...
GitHub
Contribute to cssinate/sortable-table development by creating an account on GitHub.
sortable-table/src/App.tsx at main · cssinate/sortable-table
Was this page helpful?