UNPKG

@pk-design/react-ui-kit

Version:
86 lines (85 loc) 3.31 kB
import React, { PureComponent } from 'react'; import { OptionProps, SelectProps, SelectState, ExtraInputProps } from './props'; declare class BasicSelect extends PureComponent<SelectProps, SelectState> { input: null | HTMLInputElement; _dropdownScrollableArea: null | HTMLDivElement; menu: null | HTMLDivElement; containerRef: React.RefObject<HTMLDivElement | null>; __justClicked: boolean; state: SelectState; componentDidMount(): void; UNSAFE_componentWillReceiveProps(nextProps: SelectProps): void; componentDidUpdate(_prevProps: SelectProps, prevState: SelectState): void; componentWillUnmount(): void; _getActiveIndex: (selected: Array<any>, firstItemSelected?: boolean | undefined) => number; _getActiveItem: (state?: SelectState) => OptionProps | null; _handlePropsChange: (nextProps: SelectProps, nextState: SelectState, nextOptions: Array<OptionProps>, selected: Array<OptionProps>) => void; _setInputRef: (input: HTMLInputElement) => void; _setDropdownScrollableArea: (dropdownScrollArea: HTMLDivElement) => void; _setMenuRef: (menu: HTMLDivElement) => void; _checkMenuPosition: () => void; _getMenuPosition: () => { top: any; bottom: string | number; left: any; width: any; dropup: boolean; }; _setMenuPosition: (menuPosition?: { top: any; bottom: string | number; left: any; width: any; dropup: boolean; }) => void; _handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void; _handleActiveIndexChange: (activeIndex: number) => void; _handleKeyDown: (e: React.KeyboardEvent) => void; _onClick: (e: React.MouseEvent) => void; _onFocus: (e: React.FocusEvent) => void; _onBlur: (e: React.FocusEvent) => void; _onMenuClick: (option: OptionProps) => void; _onRemoveSelected: (option: OptionProps) => void; get _hasFocus(): boolean | undefined; get _isMenuOpen(): boolean | undefined; _setFocus: (focus: boolean) => void; _triggerOpen: () => void; _openMenu: () => void; _closeMenu: () => void; _listenResizeEvent: () => void; _revokeResizeListener: () => void; _listenClickEvent: () => void; _revokeClickListener: () => void; _handleOutsideClick: (event: Event) => void; _handleResize: () => void; _handlePageScroll: (e: Event) => void; _recomputeMenuPostition: (...args: any) => void; _autoScrollEnabled: () => boolean | undefined; _enableAutoScroll: () => void; _disableAutoScroll: () => void; _menuContainer: () => JSX.Element; _getRightIcon: () => { component: any; isCustom: boolean; onClick: () => void; additionalClasses: string; }; _getLeftIcon: () => { component: any; onClick: () => void; }; get inputHeight(): any; _getContainerStyle: () => { minHeight: any; height: string; width: string | number; } | { height: any; width: string | number; minHeight?: undefined; }; _getExtraProps: () => ExtraInputProps; _getPortalTarget: () => any; render(): JSX.Element; } export default BasicSelect;