Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TanStack/query
/ onFocus
Method
onFocus
packages/query-core/src/focusManager.ts:67–72 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
65
}
66
67
onFocus(): void {
68
const
isFocused = this.isFocused()
69
this.listeners.forEach((listener) => {
70
listener(isFocused)
71
})
72
}
73
74
isFocused(): boolean {
75
if
(typeof this.#focused ===
'boolean'
) {
Callers
2
setEventListener
Method · 0.95
setFocused
Method · 0.95
Calls
2
isFocused
Method · 0.95
listener
Function · 0.50
Tested by
no test coverage detected