@@ -4,7 +4,7 @@ import type { AlignType } from 'rc-trigger/lib/interface';
4
4
import KeyCode from 'rc-util/lib/KeyCode' ;
5
5
import isMobile from 'rc-util/lib/isMobile' ;
6
6
import { useComposeRef } from 'rc-util/lib/ref' ;
7
- import type { ScrollTo } from 'rc-virtual-list/lib/List' ;
7
+ import type { ScrollTo , ScrollConfig } from 'rc-virtual-list/lib/List' ;
8
8
import useMergedState from 'rc-util/lib/hooks/useMergedState' ;
9
9
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect' ;
10
10
import { getSeparatedContent } from './utils/valueUtil' ;
@@ -46,7 +46,7 @@ export type RawValueType = string | number;
46
46
export interface RefOptionListProps {
47
47
onKeyDown : React . KeyboardEventHandler ;
48
48
onKeyUp : React . KeyboardEventHandler ;
49
- scrollTo ?: ( index : number ) => void ;
49
+ scrollTo ?: ( args : number | ScrollConfig ) => void ;
50
50
}
51
51
52
52
export type CustomTagProps = {
@@ -316,7 +316,7 @@ const BaseSelect = React.forwardRef((props: BaseSelectProps, ref: React.Ref<Base
316
316
React . useImperativeHandle ( ref , ( ) => ( {
317
317
focus : selectorRef . current ?. focus ,
318
318
blur : selectorRef . current ?. blur ,
319
- scrollTo : ( arg ) => listRef . current ?. scrollTo ( arg as any ) ,
319
+ scrollTo : ( arg ) => listRef . current ?. scrollTo ( arg ) ,
320
320
} ) ) ;
321
321
322
322
// ========================== Search Value ==========================
0 commit comments