@@ -14,7 +14,7 @@ import React from 'react';
1414import type { SelectProps } from '../src' ;
1515import Select , { OptGroup , Option , useBaseProps } from '../src' ;
1616import BaseSelect from '../src/BaseSelect' ;
17- import type { BaseSelectRef } from '../src/BaseSelect' ;
17+ import type { BaseSelectRef , RefOptionListProps } from '../src/BaseSelect' ;
1818import allowClearTest from './shared/allowClearTest' ;
1919import blurTest from './shared/blurTest' ;
2020import focusTest from './shared/focusTest' ;
@@ -2480,6 +2480,9 @@ describe('Select.Basic', () => {
24802480 listItem : { color : 'blue' } ,
24812481 input : { color : 'black' } ,
24822482 } ;
2483+ const OptionList = React . forwardRef < RefOptionListProps , any > ( ( props , ref ) => {
2484+ return < div ref = { ref as unknown as React . Ref < HTMLDivElement > } > Option List</ div > ;
2485+ } ) ;
24832486 const { container } = render (
24842487 < BaseSelect
24852488 displayValues = { [ ] }
@@ -2493,7 +2496,7 @@ describe('Select.Basic', () => {
24932496 onDisplayValuesChange = { ( ) => { } }
24942497 searchValue = ""
24952498 onSearch = { ( ) => { } }
2496- OptionList = { ( ) => < div > Option List </ div > }
2499+ OptionList = { OptionList }
24972500 emptyOptions = { false }
24982501 /> ,
24992502 ) ;
0 commit comments