mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 06:03:38 +08:00
feat: optimize select type (#42935)
This commit is contained in:
parent
5c83da5f36
commit
0ac59d42d8
@ -68,7 +68,10 @@ export interface SelectProps<
|
|||||||
|
|
||||||
const SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
|
const SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
|
||||||
|
|
||||||
const InternalSelect = <OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType>(
|
const InternalSelect = <
|
||||||
|
ValueType = any,
|
||||||
|
OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType,
|
||||||
|
>(
|
||||||
{
|
{
|
||||||
prefixCls: customizePrefixCls,
|
prefixCls: customizePrefixCls,
|
||||||
bordered = true,
|
bordered = true,
|
||||||
@ -90,7 +93,7 @@ const InternalSelect = <OptionType extends BaseOptionType | DefaultOptionType =
|
|||||||
popupMatchSelectWidth,
|
popupMatchSelectWidth,
|
||||||
direction: propDirection,
|
direction: propDirection,
|
||||||
...props
|
...props
|
||||||
}: SelectProps<OptionType>,
|
}: SelectProps<ValueType, OptionType>,
|
||||||
ref: React.Ref<BaseSelectRef>,
|
ref: React.Ref<BaseSelectRef>,
|
||||||
) => {
|
) => {
|
||||||
const {
|
const {
|
||||||
@ -220,7 +223,7 @@ const InternalSelect = <OptionType extends BaseOptionType | DefaultOptionType =
|
|||||||
|
|
||||||
// ====================== Render =======================
|
// ====================== Render =======================
|
||||||
return wrapSSR(
|
return wrapSSR(
|
||||||
<RcSelect<any, any>
|
<RcSelect<ValueType, OptionType>
|
||||||
ref={ref}
|
ref={ref}
|
||||||
virtual={virtual}
|
virtual={virtual}
|
||||||
showSearch={select?.showSearch}
|
showSearch={select?.showSearch}
|
||||||
|
Loading…
Reference in New Issue
Block a user