mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
Fix Select Mode Type
This commit is contained in:
parent
53c55ceaad
commit
9cfc151813
@ -51,10 +51,17 @@ export interface LabeledValue {
|
||||
|
||||
export type SelectValue = string | string[] | number | number[] | LabeledValue | LabeledValue[];
|
||||
|
||||
export type ModeOptions =
|
||||
| 'SECRET_COMBOBOX_MODE_DO_NOT_USE'
|
||||
| 'default'
|
||||
| 'multiple'
|
||||
| 'tags'
|
||||
| 'combobox'
|
||||
| undefined;
|
||||
export interface SelectProps<T = SelectValue> extends AbstractSelectProps {
|
||||
value?: T;
|
||||
defaultValue?: T;
|
||||
mode?: 'default' | 'multiple' | 'tags' | 'combobox' | undefined;
|
||||
mode?: ModeOptions;
|
||||
optionLabelProp?: string;
|
||||
firstActiveValue?: string | string[];
|
||||
onChange?: (value: T, option: React.ReactElement<any> | React.ReactElement<any>[]) => void;
|
||||
@ -114,7 +121,7 @@ export default class Select<T = SelectValue> extends React.Component<SelectProps
|
||||
|
||||
static OptGroup = OptGroup as React.ClassicComponentClass<OptGroupProps>;
|
||||
|
||||
static SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
|
||||
static SECRET_COMBOBOX_MODE_DO_NOT_USE: ModeOptions = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
|
||||
|
||||
static defaultProps = {
|
||||
showSearch: false,
|
||||
|
Loading…
Reference in New Issue
Block a user