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 Jul 17, 2024
1 parent c101251 commit 0931abd
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 @@ -161,7 +161,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 0931abd

Please sign in to comment.