MCPcopy Create free account
hub / github.com/Effect-TS/effect / scrolling

Function scrolling

packages/ui/native/src/kit/VirtualList.ts:441–456  ·  view source on GitHub ↗
(
  model: Model,
  props: VirtualListProps,
  on: boolean
)

Source from the content-addressed store, hash-verified

439}
440
441const scrolling = (
442 model: Model,
443 props: VirtualListProps,
444 on: boolean
445): Virtualizer.Updated<Model> =>
446 model.scrolling === on ? { model, events: [] } : Virtualizer.update(
447 model,
448 props,
449 Virtualizer.Message.ScrolledViewport({
450 offset: model.offset,
451 height: model.height,
452 length: model.length,
453 anchor: model.position,
454 scrolling: on
455 })
456 )
457
458type ItemOf<B extends View.PartTarget<"view">> = ReturnType<B["attr"]>
459

Callers 1

VirtualList.tsFile · 0.70

Calls 1

updateMethod · 0.65

Tested by

no test coverage detected