From 9a93e93dcbe5c02ad61dbd87d5e0c27251a583c6 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Fri, 24 May 2024 18:35:08 +0300 Subject: [PATCH] fix: update initialTopMostItemIndex type in TableVirtuoso interface (#1091) --- src/component-interfaces/TableVirtuoso.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/component-interfaces/TableVirtuoso.ts b/src/component-interfaces/TableVirtuoso.ts index 2af484c4e..30e37d696 100644 --- a/src/component-interfaces/TableVirtuoso.ts +++ b/src/component-interfaces/TableVirtuoso.ts @@ -13,6 +13,7 @@ import type { TableComponents, StateSnapshot, StateCallback, + IndexLocationWithAlign, } from '../interfaces' import type { VirtuosoProps } from './Virtuoso' @@ -59,8 +60,9 @@ export interface TableVirtuosoProps extends Omit, 'com /** * Set to a value between 0 and totalCount - 1 to make the list start scrolled to that item. + * Pass in an object to achieve additional effects similar to `scrollToIndex`. */ - initialTopMostItemIndex?: number + initialTopMostItemIndex?: number | IndexLocationWithAlign /** * Set this value to offset the initial location of the list.