Skip to content

Commit 81f9b58

Browse files
authored
fix(cubejs-client-react): useCubeQuery initial loading state (#9117)
1 parent 39190e0 commit 81f9b58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/cubejs-client-react/src/hooks/cube-query.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function useCubeQuery(query, options = {}) {
99
const mutexRef = useRef({});
1010
const isMounted = useIsMounted();
1111
const [currentQuery, setCurrentQuery] = useState(null);
12-
const [isLoading, setLoading] = useState(false);
12+
const [isLoading, setLoading] = useState(!options.skip);
1313
const [resultSet, setResultSet] = useState(null);
1414
const [progress, setProgress] = useState(null);
1515
const [error, setError] = useState(null);
@@ -33,7 +33,7 @@ export function useCubeQuery(query, options = {}) {
3333

3434
setError(null);
3535
setLoading(true);
36-
36+
3737
try {
3838
const response = await cubeApi.load(query, {
3939
mutexObj: mutexRef.current,

0 commit comments

Comments
 (0)