Skip to content

Commit 6c7ff1a

Browse files
committed
item to listItem
1 parent e609a33 commit 6c7ff1a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/OptionList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ const OptionList: React.ForwardRefRenderFunction<RefOptionListProps, {}> = (_, r
363363
itemPrefixCls,
364364
optionPrefixCls,
365365
className,
366-
contextClassNames?.item,
366+
contextClassNames?.listItem,
367367
{
368368
[`${optionPrefixCls}-grouped`]: groupOption,
369369
[`${optionPrefixCls}-active`]: activeIndex === itemIndex && !mergedDisabled,
@@ -403,7 +403,7 @@ const OptionList: React.ForwardRefRenderFunction<RefOptionListProps, {}> = (_, r
403403
onSelectValue(value);
404404
}
405405
}}
406-
style={{ ...contextStyles?.item, ...style }}
406+
style={{ ...contextStyles?.listItem, ...style }}
407407
>
408408
<div className={`${optionPrefixCls}-content`}>
409409
{typeof optionRender === 'function'

src/Select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export type SelectHandler<ValueType, OptionType extends BaseOptionType = Default
107107

108108
type ArrayElementType<T> = T extends (infer E)[] ? E : T;
109109

110-
export type SemanticName = 'prefix' | 'suffix' | 'item' | 'list' | 'input';
110+
export type SemanticName = 'prefix' | 'suffix' | 'listItem' | 'list' | 'input';
111111
export interface SelectProps<ValueType = any, OptionType extends BaseOptionType = DefaultOptionType>
112112
extends BaseSelectPropsWithoutPrivate {
113113
prefixCls?: string;

tests/Select.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2422,14 +2422,14 @@ describe('Select.Basic', () => {
24222422
prefix: 'cutsom-prefix',
24232423
suffix: 'custom-suffix',
24242424
list: 'custom-list',
2425-
item: 'custom-item',
2425+
listItem: 'custom-item',
24262426
input: 'custom-input',
24272427
};
24282428
const customStyle = {
24292429
prefix: { color: 'red' },
24302430
suffix: { color: 'green' },
24312431
list: { color: 'yellow' },
2432-
item: { color: 'blue' },
2432+
listItem: { color: 'blue' },
24332433
input: { color: 'black' },
24342434
};
24352435
const { container } = render(
@@ -2457,8 +2457,8 @@ describe('Select.Basic', () => {
24572457
expect(prefix).toHaveStyle(customStyle.prefix);
24582458
expect(suffix).toHaveClass(customClassNames.suffix);
24592459
expect(suffix).toHaveStyle(customStyle.suffix);
2460-
expect(item).toHaveClass(customClassNames.item);
2461-
expect(item).toHaveStyle(customStyle.item);
2460+
expect(item).toHaveClass(customClassNames.listItem);
2461+
expect(item).toHaveStyle(customStyle.listItem);
24622462
expect(list).toHaveClass(customClassNames.list);
24632463
expect(list).toHaveStyle(customStyle.list);
24642464
expect(input).toHaveClass(customClassNames.input);

0 commit comments

Comments
 (0)