UNPKG

chowa

Version:

UI component library based on React

41 lines (40 loc) 1.36 kB
/** * @license chowa v1.1.3 * * Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn). * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import * as React from 'react'; import { Options, Option } from './select'; export interface SelectSelectorProps { multiple: boolean; noDataDescription: React.ReactNode; noDataImg: string; noDataImgStyle: React.CSSProperties; searchable: boolean; searchValue: string; options: Options; activeOption: Option; selectedOptions: Option[]; selectHandler: (option: Option) => void; deSelectHandler: (option: Option) => void; onKeyDown: (e: React.KeyboardEvent) => void; onFilter?: (searchValue: string, option: Option) => boolean; onOptionMouseEnter: (option: Option) => void; onOptionMouseLeave: () => void; } export interface SelectSelectorState { renderOptions: Options; } declare class SelectSelector extends React.PureComponent<SelectSelectorProps, SelectSelectorState> { private wrapperEle; constructor(props: SelectSelectorProps); componentDidUpdate(preProps: SelectSelectorProps): void; private computedActiveOptionInVisible; private renderOptionGroup; private renderOption; render(): JSX.Element; } export default SelectSelector;