MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / scrollToIndex

Method scrollToIndex

src/utils/VirtualScroller.ts:826–832  ·  view source on GitHub ↗

* Scroll to a specific item index

(index: number, behavior: ScrollBehavior = "smooth")

Source from the content-addressed store, hash-verified

824 * Scroll to a specific item index
825 */
826 scrollToIndex(index: number, behavior: ScrollBehavior = "smooth"): void {
827 const targetScroll = this.getItemPosition(index);
828 this.scrollContainer.scrollTo({
829 top: targetScroll,
830 behavior,
831 });
832 }
833
834 /**
835 * Force recalculation of visible range (useful after container resize)

Callers

nothing calls this directly

Calls 1

getItemPositionMethod · 0.95

Tested by

no test coverage detected