Skip to content

Commit 1a6f835

Browse files
committed
fix
1 parent 2b2a1a7 commit 1a6f835

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/Select.test.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import React from 'react';
1414
import type { SelectProps } from '../src';
1515
import Select, { OptGroup, Option, useBaseProps } from '../src';
1616
import BaseSelect from '../src/BaseSelect';
17-
import type { BaseSelectRef } from '../src/BaseSelect';
17+
import type { BaseSelectRef, RefOptionListProps } from '../src/BaseSelect';
1818
import allowClearTest from './shared/allowClearTest';
1919
import blurTest from './shared/blurTest';
2020
import 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

Comments
 (0)