@@ -3,16 +3,17 @@ import KeyCode from 'rc-util/lib/KeyCode';
33import pickAttrs from 'rc-util/lib/pickAttrs' ;
44import useMemo from 'rc-util/lib/hooks/useMemo' ;
55import classNames from 'classnames' ;
6- import List , { ListRef } from 'rc-virtual-list' ;
6+ import type { ListRef } from 'rc-virtual-list' ;
7+ import List from 'rc-virtual-list' ;
78import TransBtn from './TransBtn' ;
8- import {
9+ import type {
910 OptionsType as SelectOptionsType ,
1011 FlattenOptionData as SelectFlattenOptionData ,
1112 OptionData ,
1213 RenderNode ,
1314 OnActiveValue ,
1415} from './interface' ;
15- import { RawValueType , FlattenOptionsType } from './interface/generator' ;
16+ import type { RawValueType , FlattenOptionsType } from './interface/generator' ;
1617
1718export interface OptionListProps < OptionsType extends object [ ] > {
1819 prefixCls : string ;
@@ -89,7 +90,7 @@ const OptionList: React.RefForwardingComponent<
8990 // =========================== List ===========================
9091 const listRef = React . useRef < ListRef > ( null ) ;
9192
92- const onListMouseDown : React . MouseEventHandler < HTMLDivElement > = event => {
93+ const onListMouseDown : React . MouseEventHandler < HTMLDivElement > = ( event ) => {
9394 event . preventDefault ( ) ;
9495 } ;
9596
@@ -176,7 +177,7 @@ const OptionList: React.RefForwardingComponent<
176177
177178 // ========================= Keyboard =========================
178179 React . useImperativeHandle ( ref , ( ) => ( {
179- onKeyDown : event => {
180+ onKeyDown : ( event ) => {
180181 const { which } = event ;
181182 switch ( which ) {
182183 // >>> Arrow keys
@@ -226,7 +227,7 @@ const OptionList: React.RefForwardingComponent<
226227 } ,
227228 onKeyUp : ( ) => { } ,
228229
229- scrollTo : index => {
230+ scrollTo : ( index ) => {
230231 scrollIntoView ( index ) ;
231232 } ,
232233 } ) ) ;
0 commit comments