jamis
Version:
一种支持通过JSON配置方式生成页面的组件库
33 lines (32 loc) • 1.06 kB
TypeScript
/**
* Transfer 搜索
*/
import React from 'react';
import type { LocaleProps, ThemeProps } from 'jamis-core';
export interface TransferSearchProps extends ThemeProps, LocaleProps {
className?: string;
placeholder: string;
onSearch: (val: string) => void;
onCancelSearch: Function;
}
export interface ItemRenderStates {
index: number;
disabled?: boolean;
onChange: (value: any, name: string) => void;
}
interface TransferSearchState {
inputValue: string;
}
export declare class TransferSearch extends React.Component<TransferSearchProps, TransferSearchState> {
static itemRender(option: any): JSX.Element;
static defaultProps: Pick<TransferSearchProps, 'placeholder'>;
state: TransferSearchState;
cancelSearch?: () => void;
componentWillUnmount(): void;
handleSearch(inputValue: string): void;
lazySearch: import("lodash").DebouncedFunc<() => void>;
handleSearchKeyDown(e: React.KeyboardEvent<any>): void;
handleSeachCancel(): void;
render(): JSX.Element;
}
export default TransferSearch;