koko-react-select
Version:
한국어 초성, 부분 검색을 지원하는 커스텀 React Select 컴포넌트입니다. 멀티 선택, 검색, 초기화 기능을 포함합니다.
26 lines (25 loc) • 926 B
TypeScript
import './koko-react-select.css';
import { CustomClassName, OptionType } from './type/commonType.ts';
type CommonSelectProps<T extends string | number> = {
optionList: OptionType<T>[];
placeholder?: string;
isSearchable?: boolean;
isClearable?: boolean;
disabled?: boolean;
invalid?: boolean;
maxHeight?: string;
customClassName?: CustomClassName;
};
type SingleSelectProps<T extends string | number> = CommonSelectProps<T> & {
isMulti?: false;
value: T | null;
onChange: (value: T | null) => void;
};
type MultiSelectProps<T extends string | number> = CommonSelectProps<T> & {
isMulti: true;
value: T[];
onChange: (value: T[]) => void;
};
type SelectProps<T extends string | number> = SingleSelectProps<T> | MultiSelectProps<T>;
declare const Select: <T extends string | number>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
export default Select;