@@ -14,7 +14,7 @@ import React from 'react';
14
14
import type { SelectProps } from '../src' ;
15
15
import Select , { OptGroup , Option , useBaseProps } from '../src' ;
16
16
import BaseSelect from '../src/BaseSelect' ;
17
- import type { BaseSelectRef } from '../src/BaseSelect' ;
17
+ import type { BaseSelectRef , RefOptionListProps } from '../src/BaseSelect' ;
18
18
import allowClearTest from './shared/allowClearTest' ;
19
19
import blurTest from './shared/blurTest' ;
20
20
import focusTest from './shared/focusTest' ;
@@ -2480,6 +2480,9 @@ describe('Select.Basic', () => {
2480
2480
listItem : { color : 'blue' } ,
2481
2481
input : { color : 'black' } ,
2482
2482
} ;
2483
+ const OptionList = React . forwardRef < RefOptionListProps , any > ( ( props , ref ) => {
2484
+ return < div ref = { ref as unknown as React . Ref < HTMLDivElement > } > Option List</ div > ;
2485
+ } ) ;
2483
2486
const { container } = render (
2484
2487
< BaseSelect
2485
2488
displayValues = { [ ] }
@@ -2493,7 +2496,7 @@ describe('Select.Basic', () => {
2493
2496
onDisplayValuesChange = { ( ) => { } }
2494
2497
searchValue = ""
2495
2498
onSearch = { ( ) => { } }
2496
- OptionList = { ( ) => < div > Option List </ div > }
2499
+ OptionList = { OptionList }
2497
2500
emptyOptions = { false }
2498
2501
/> ,
2499
2502
) ;
0 commit comments