MCPcopy Create free account
hub / github.com/react-component/select / SelectProps

Interface SelectProps

src/Select.tsx:112–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110type ArrayElementType<T> = T extends (infer E)[] ? E : T;
111
112export interface SelectProps<ValueType = any, OptionType extends BaseOptionType = DefaultOptionType>
113 extends BaseSelectPropsWithoutPrivate {
114 prefixCls?: string;
115 id?: string;
116
117 backfill?: boolean;
118
119 // >>> Field Names
120 fieldNames?: FieldNames;
121
122 // >>> Search
123 /** @deprecated Use `searchValue` instead */
124 inputValue?: string;
125 searchValue?: string;
126 onSearch?: (value: string) => void;
127 autoClearSearchValue?: boolean;
128
129 // >>> Select
130 onSelect?: SelectHandler<ArrayElementType<ValueType>, OptionType>;
131 onDeselect?: SelectHandler<ArrayElementType<ValueType>, OptionType>;
132
133 // >>> Options
134 /**
135 * In Select, `false` means do nothing.
136 * In TreeSelect, `false` will highlight match item.
137 * It's by design.
138 */
139 filterOption?: boolean | FilterFunc<OptionType>;
140 filterSort?: (optionA: OptionType, optionB: OptionType, info: { searchValue: string }) => number;
141 optionFilterProp?: string;
142 optionLabelProp?: string;
143 children?: React.ReactNode;
144 options?: OptionType[];
145 optionRender?: (
146 oriOption: FlattenOptionData<OptionType>,
147 info: { index: number },
148 ) => React.ReactNode;
149 defaultActiveFirstOption?: boolean;
150 virtual?: boolean;
151 direction?: 'ltr' | 'rtl';
152 listHeight?: number;
153 listItemHeight?: number;
154 labelRender?: (props: LabelInValueType) => React.ReactNode;
155
156 // >>> Icon
157 menuItemSelectedIcon?: RenderNode;
158
159 mode?: 'combobox' | 'multiple' | 'tags';
160 labelInValue?: boolean;
161 value?: ValueType | null;
162 defaultValue?: ValueType | null;
163 maxCount?: number;
164 onChange?: (value: ValueType, option?: OptionType | OptionType[]) => void;
165}
166
167function isRawValue(value: DraftValueType): value is RawValueType {
168 return !value || typeof value !== 'object';

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…