Skip to content

Commit 74a89bf

Browse files
committed
breaking: rename loading to isLoading
1 parent 150c4d4 commit 74a89bf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface Config<Cond = Record<string, any>, Result = unknown, AfterFetch
4747
export interface UseConditionWatcherReturn<Cond, Result> {
4848
conditions: UnwrapNestedRefs<Cond>
4949
readonly isFetching: Ref<boolean>
50-
readonly loading: Ref<boolean>
50+
readonly isLoading: Ref<boolean>
5151
readonly data: Readonly<Ref<Result | undefined>>
5252
readonly error: Ref<any | undefined>
5353
execute: (throwOnFailed?: boolean) => void

core/use-condition-watcher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default function useConditionWatcher<Cond extends Record<string, any>, Re
106106
Object.assign(_conditions, isObject(cond) && !cond.type ? cond : backupIntiConditions)
107107
}
108108

109-
const loading = computed(() => !error.value && !data.value)
109+
const isLoading = computed(() => !error.value && !data.value)
110110

111111
const conditionsChangeHandler = async (conditions, throwOnFailed = false) => {
112112
const checkThrowOnFailed = typeof throwOnFailed === 'boolean' ? throwOnFailed : false
@@ -334,7 +334,7 @@ export default function useConditionWatcher<Cond extends Record<string, any>, Re
334334
data: readonly(data),
335335
error: readonly(error),
336336
isFetching: readonly(isFetching),
337-
loading,
337+
isLoading,
338338
execute,
339339
mutate,
340340
resetConditions,

0 commit comments

Comments
 (0)