UNPKG

@beisen-phoenix/select

Version:

## 概述

70 lines (69 loc) 2.23 kB
import React from 'react'; import { SelectValue } from './PropsInterface'; import { Item } from './PropsInterface'; import { DefaultTranslationType } from '../langs'; export interface SelectProps extends SelectValue { onChange?: Function; onDelete?: Function; onSearch?: Function; placeHolder?: string; size?: 'small' | 'normal' | 'large'; isMultiSelect?: boolean; disabled?: boolean; isSearch?: boolean; readOnly?: boolean; isActive?: boolean; showDelete?: boolean; error?: boolean; translation?: DefaultTranslationType; } export interface SelectState extends SelectValue { inputValue: string; isFocus: boolean; isHasTooltip: boolean; visibleTxt: boolean; hover: boolean; searchWord: string; inputWidth: number; } export default class Select extends React.PureComponent<SelectProps, SelectState> { static defaultProps: { size: string; disabled: boolean; isMultiSelect: boolean; placeHolder: string; isSearch: boolean; readOnly: boolean; isActive: boolean; showDelete: boolean; translation: DefaultTranslationType; }; private inputRef; private hiddenSpanRef; private ulRef; private clickDelet; constructor(props: SelectProps); emitPropsChangeMethod: () => void; handleValue: () => "" | Item[]; isShowToolTip: () => void; componentDidMount(): void; componentWillReceiveProps(nextProps: SelectProps): void; componentDidUpdate(prevProps: SelectProps): void; componentWillUnmount(): 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; }