MCPcopy Index your code
hub / github.com/TanStack/virtual / createHandler

Function createHandler

packages/virtual-core/src/index.ts:166–173  ·  view source on GitHub ↗
(isScrolling: boolean)

Source from the content-addressed store, hash-verified

164 )
165
166 const createHandler = (isScrolling: boolean) => () => {
167 const { horizontal, isRtl } = instance.options
168 offset = horizontal
169 ? element['scrollLeft'] * ((isRtl && -1) || 1)
170 : element['scrollTop']
171 fallback()
172 cb(offset, isScrolling)
173 }
174 const handler = createHandler(true)
175 const endHandler = createHandler(false)
176 endHandler()

Callers 2

observeElementOffsetFunction · 0.85
observeWindowOffsetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected