@quanxi/ui
Version:
全悉组件库
35 lines (34 loc) • 1.07 kB
TypeScript
import React from "react";
import { SelectProps as RcSelectProps } from "rc-select";
import "./style.scss";
export type SelectOption<T = string> = {
label: T;
value?: string | number;
options?: SelectOption<T>[];
};
export interface SelectProps<T> extends Omit<RcSelectProps, 'options' | 'onChange'> {
placeholder?: string;
options: SelectOption<T>[];
value?: React.Key[] | React.Key | undefined;
disabled?: boolean;
multiple?: boolean;
maxTagCount?: number | "responsive";
suffixIcon?: React.ReactNode;
onChange?: (v: React.Key[] | React.Key | undefined) => void;
allowClear?: boolean;
style?: React.CSSProperties;
dropdownClassName?: string;
noActiveStyle?: boolean;
className?: string;
showHighLight?: boolean;
virtual?: boolean;
listHeight?: number;
listItemHeight?: number;
}
export interface SelectRef {
focus: () => void;
}
declare const _default: <T = string>(props: SelectProps<T> & {
ref?: React.Ref<SelectRef> | undefined;
}) => JSX.Element;
export default _default;