Skip to content

Commit

Permalink
fix(query-core): allow function value of notifyOnChangeProps query …
Browse files Browse the repository at this point in the history
…option to return `undefined`

`undefined` is a valid return value for the function value of `notifyOnChangeProps`. See linked issue for more details.

Fixes #7426.
  • Loading branch information
winghouchan committed May 16, 2024
1 parent fece4af commit 3a8c2b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/query-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ export type NetworkMode = 'online' | 'always' | 'offlineFirst'
export type NotifyOnChangeProps =
| Array<keyof InfiniteQueryObserverResult>
| 'all'
| (() => Array<keyof InfiniteQueryObserverResult> | 'all')
| undefined
| (() => Array<keyof InfiniteQueryObserverResult> | 'all' | undefined)

export interface QueryOptions<
TQueryFnData = unknown,
Expand Down

0 comments on commit 3a8c2b1

Please sign in to comment.