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

Function onFocus

packages/query-devtools/src/Devtools.tsx:248–252  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

246 // This is to make sure that the font size is updated when the stylesheet is updated
247 // and the user focuses back on the window
248 const onFocus = () => {
249 const root = transitionsContainerRef.parentElement as HTMLElement
250 const fontSize = getComputedStyle(root).fontSize
251 root.style.setProperty('--tsqd-font-size', fontSize)
252 }
253 onFocus()
254 window.addEventListener('focus', onFocus)
255 onCleanup(() => {

Callers 2

DevtoolsFunction · 0.85
listenerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected