[BUG] setShowId is not triggering queryResult: isLoading, isError on useShow
Describe the bug
When trying to change viewing record with setShowId, isLoading and isError are not triggered.
Steps To Reproduce
const { queryResult, setShowId } = useShow();
const { isLoading } = queryResult;
if (isLoading) {
return (
<Loader />
)
}
After calling
setShowId(3)
nothing happens until resource is fetched succesfully. If request is bad, isError isn't triggered either.
Expected behavior
To be able to use isLoading to show loading screen or isError to catch error.
Packages
- @refinedev/core
Additional Context
No response
Hey @beg1c
isLoading is false initially, before the query mounts. And then it becomes true when query is mounted (Not necessarily fetch. It might be disabled.). Once isLoading is true, it never goes back to false. Unlike isFetching.
For isErrror, could you provide a minimal reproducible example?
Closing this for now, feel free to re-open when you can provide a minimal reproducible example about the isError property.