Skip to content

DynamicScrollerItem

DynamicScrollerItem is the measurement wrapper used inside DynamicScroller. It watches each rendered item and reports size changes back to the scroller.

Props

PropDefaultDescription
item (required)The item rendered in the scroller.
active (required)Whether the current item is active. When it is inactive, unnecessary size recomputation is skipped.
indexItem index. Required when DynamicScroller uses simple-array mode or a function keyField. Optional for object items with a string keyField such as the default 'id'.
watchDatafalseDeeply watch item for legacy environments without ResizeObserver (not recommended, can impact performance).
tag'div'Element used to render the component.
emitResizefalseEmit the resize event each time the size is recomputed (can impact performance).

Usage notes

  • DynamicScrollerItem identifies measurements from item plus scroller keyField, not from debug DOM attributes such as data-index.
  • In modern browsers, rendered size changes are tracked automatically through ResizeObserver.
  • When index is required, pass slot index directly: :index="index".

Events

EventDescription
resizeEmitted each time the size is recomputed, only if emitResize prop is true.

Released under the MIT License.