1 | import * as React from 'react';
|
2 | import Input, { InputProps } from './Input';
|
3 | import { SizeType } from '../config-provider/SizeContext';
|
4 | import { ConfigConsumerProps } from '../config-provider';
|
5 | export interface SearchProps extends InputProps {
|
6 | inputPrefixCls?: string;
|
7 | onSearch?: (value: string, event?: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLInputElement>) => void;
|
8 | enterButton?: React.ReactNode;
|
9 | loading?: boolean;
|
10 | }
|
11 | export default class Search extends React.Component<SearchProps, any> {
|
12 | static defaultProps: {
|
13 | enterButton: boolean;
|
14 | };
|
15 | private input;
|
16 | saveInput: (node: Input) => void;
|
17 | onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
18 | onMouseDown: React.MouseEventHandler<HTMLElement>;
|
19 | onSearch: (e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLInputElement>) => void;
|
20 | focus(): void;
|
21 | blur(): void;
|
22 | renderLoading: (prefixCls: string) => JSX.Element;
|
23 | renderSuffix: (prefixCls: string) => {} | null | undefined;
|
24 | renderAddonAfter: (prefixCls: string, size: SizeType) => {} | null | undefined;
|
25 | renderSearch: ({ getPrefixCls, direction }: ConfigConsumerProps) => JSX.Element;
|
26 | render(): JSX.Element;
|
27 | }
|