VirtualScroller: add missing method typings

pull/1692/head
Javier Peletier 2021-10-20 09:49:52 +02:00 committed by Tuğçe Küçükoğlu
parent 217ff51323
commit edc1f49178
1 changed files with 13 additions and 0 deletions

View File

@ -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;