From edc1f49178268c48645b8e1f02566594a82f1f84 Mon Sep 17 00:00:00 2001 From: Javier Peletier Date: Wed, 20 Oct 2021 09:49:52 +0200 Subject: [PATCH] VirtualScroller: add missing method typings --- src/components/virtualscroller/VirtualScroller.d.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/components/virtualscroller/VirtualScroller.d.ts b/src/components/virtualscroller/VirtualScroller.d.ts index aae82fd9d..3e8e2fb72 100644 --- a/src/components/virtualscroller/VirtualScroller.d.ts +++ b/src/components/virtualscroller/VirtualScroller.d.ts @@ -15,8 +15,21 @@ interface VirtualScrollerProps { class?: string; } +interface Range { + first: number; + last: number; + viewport: { + first: number; + last: number; + } +} + declare class VirtualScroller { $props: VirtualScrollerProps; + scrollTo(options?: ScrollToOptions): void; + scrollToIndex(index: number, behavior: ScrollBehavior): void; + scrollInView(index: number, to: "to-start" | "to-end", behavior: ScrollBehavior): void; + getRenderedRange(): Range $emit(eventName: 'update:numToleratedItems', value: number): this; $emit(eventName: 'scroll-index-change', value: { first: number, last: number }): this; $emit(eventName: 'lazy-load', value: { first: number, last: number }): this;