@beisen-phoenix/select
Version:
## 概述
56 lines (55 loc) • 1.81 kB
TypeScript
import React from "react";
import { SelectProps, SelectValue } from "./PropsInterface";
import { Item } from "./PropsInterface";
import "./index.scss";
export interface SelectState extends SelectValue {
inputValue: string;
isFocus: boolean;
isHasTooltip: boolean;
visibleTxt: boolean;
hover: boolean;
searchWord: string;
inputWidth: number;
adjustArrow?: boolean;
}
export default class Select extends React.PureComponent<SelectProps, SelectState> {
static defaultProps: {
size: string;
disabled: boolean;
isMultiSelect: boolean;
placeHolder: string;
isSearch: boolean;
readOnly: boolean;
showDelete: boolean;
translation: {};
};
private inputRef;
private hiddenSpanRef;
private ulRef;
private clickDelet;
constructor(props: SelectProps);
emitPropsChangeMethod: () => void;
handleValue: () => "" | Item[];
isShowToolTip: () => void;
adjustArrow: () => void;
componentDidMount(): void;
componentWillReceiveProps(nextProps: SelectProps): void;
componentDidUpdate(prevProps: SelectProps): void;
resetStatus: () => void;
inputing: (evt: any) => void;
onBlur: (e: any) => void;
onKeyDown: (e: any) => void;
onWrapperClick: (e?: any) => void;
onWrapperMouseEnter: () => void;
onWrapperMouseLeave: () => void;
deleteTxt: (e: any) => void;
removeItem: (item: number | Item) => void;
renderMutiItems: () => JSX.Element[] | undefined;
renderTxt: () => JSX.Element | null | undefined;
handleInputWidth: () => number | undefined;
switchDropDown: () => void;
isShowPlaceHolder: () => true | undefined;
getInputValue: () => string;
getDeleteIconState(): boolean | undefined;
render(): JSX.Element;
}