@tanstack/solid-query 4.7.2 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/umd/index.development.js +9 -6
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/createInfiniteQuery.test.tsx +2 -0
- package/src/__tests__/createQuery.test.tsx +5 -0
|
@@ -2480,12 +2480,15 @@
|
|
|
2480
2480
|
}
|
|
2481
2481
|
|
|
2482
2482
|
const isFetching = fetchStatus === 'fetching';
|
|
2483
|
+
const isLoading = status === 'loading';
|
|
2484
|
+
const isError = status === 'error';
|
|
2483
2485
|
const result = {
|
|
2484
2486
|
status,
|
|
2485
2487
|
fetchStatus,
|
|
2486
|
-
isLoading
|
|
2488
|
+
isLoading,
|
|
2487
2489
|
isSuccess: status === 'success',
|
|
2488
|
-
isError
|
|
2490
|
+
isError,
|
|
2491
|
+
isInitialLoading: isLoading && isFetching,
|
|
2489
2492
|
data,
|
|
2490
2493
|
dataUpdatedAt,
|
|
2491
2494
|
error,
|
|
@@ -2494,13 +2497,13 @@
|
|
|
2494
2497
|
errorUpdateCount: state.errorUpdateCount,
|
|
2495
2498
|
isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,
|
|
2496
2499
|
isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,
|
|
2497
|
-
isFetching
|
|
2498
|
-
isRefetching: isFetching &&
|
|
2499
|
-
isLoadingError:
|
|
2500
|
+
isFetching,
|
|
2501
|
+
isRefetching: isFetching && !isLoading,
|
|
2502
|
+
isLoadingError: isError && state.dataUpdatedAt === 0,
|
|
2500
2503
|
isPaused: fetchStatus === 'paused',
|
|
2501
2504
|
isPlaceholderData,
|
|
2502
2505
|
isPreviousData,
|
|
2503
|
-
isRefetchError:
|
|
2506
|
+
isRefetchError: isError && state.dataUpdatedAt !== 0,
|
|
2504
2507
|
isStale: isStale(query, options),
|
|
2505
2508
|
refetch: this.refetch,
|
|
2506
2509
|
remove: this.remove
|