Skip to content

Commit

Permalink
fix(cubejs-client-react): useCubeQuery initial loading state (#9117)
Browse files Browse the repository at this point in the history
  • Loading branch information
tenphi authored Jan 21, 2025
1 parent 39190e0 commit 81f9b58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cubejs-client-react/src/hooks/cube-query.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function useCubeQuery(query, options = {}) {
const mutexRef = useRef({});
const isMounted = useIsMounted();
const [currentQuery, setCurrentQuery] = useState(null);
const [isLoading, setLoading] = useState(false);
const [isLoading, setLoading] = useState(!options.skip);
const [resultSet, setResultSet] = useState(null);
const [progress, setProgress] = useState(null);
const [error, setError] = useState(null);
Expand All @@ -33,7 +33,7 @@ export function useCubeQuery(query, options = {}) {

setError(null);
setLoading(true);

try {
const response = await cubeApi.load(query, {
mutexObj: mutexRef.current,
Expand Down

0 comments on commit 81f9b58

Please sign in to comment.