MCPcopy Create free account
hub / github.com/TanStack/query / setFocused

Method setFocused

packages/query-core/src/focusManager.ts:59–65  ·  view source on GitHub ↗
(focused?: boolean)

Source from the content-addressed store, hash-verified

57 }
58
59 setFocused(focused?: boolean): void {
60 const changed = this.#focused !== focused
61 if (changed) {
62 this.#focused = focused
63 this.onFocus()
64 }
65 }
66
67 onFocus(): void {
68 const isFocused = this.isFocused()

Callers 5

setEventListenerMethod · 0.95
onAppStateChangeFunction · 0.80

Calls 1

onFocusMethod · 0.95

Tested by

no test coverage detected