-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
client:reactIssues relating to the React client SDKIssues relating to the React client SDKhelp wantedCommunity contributions are welcome.Community contributions are welcome.
Description
Describe the bug
isLoading for useCubeQuery is forever true if the query is empty.
To Reproduce
- Use
useCubeQueryto send a query that is empty (empty lists for dimensions, measures, etc) - Notice
isLoadingis always set to true
In the sandbox, notice how it's forever "Loading...". And the console logs isLoading as true too, even though the request finished long ago.
In the code:
The default value for isLoading on L12 is the same as the opposite of the skip option. Then the isQueryPresent check for empty query skips everything else so isLoading is never updated again.
Expected behavior
isLoading should be false as soon as the request finishes/never been fired, whether the query was empty or not.
Minimally reproducible Cube Schema
N/A
Version:
Noticed on the latest 1.2, but seems like it's been there since 1.1
Additional context
Add any other context about the problem here.
HrisIord
Metadata
Metadata
Assignees
Labels
client:reactIssues relating to the React client SDKIssues relating to the React client SDKhelp wantedCommunity contributions are welcome.Community contributions are welcome.