Replies: 1 comment
-
Can’t really say much without seeing any code. If you have a working sandbox, add more code in the direction of your real app until it breaks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So I have this Searchbar component that triggers a query when clicking a button or pressing the Enter key. They both call the same function passed via props.
When triggering the query via the button, it works well (fetches the data and displays it).
https://user-images.githubusercontent.com/90365536/139159662-b7df8c4c-f32a-4a7f-a5c2-93a906089287.mov
The problem is when I trigger the query using the Enter key, it does fetch the data properly but it disables the result (seeing it in react-query devtools).
https://user-images.githubusercontent.com/90365536/139159482-86db2a72-a46c-4d13-8c62-97ebd3c63ce6.mov
I'm pretty sure I messed up somewhere. Not sure when react-query behaves this way. The query is enabled and all other options are in their default.
I should also mention I couldn't really replicate this in a codesandbox :(
Beta Was this translation helpful? Give feedback.
All reactions