1 | import React from 'react';
|
2 | import { SearchBarPropsType, SearchBarState } from './PropsType';
|
3 | export interface SearchBarProps extends SearchBarPropsType {
|
4 | prefixCls?: string;
|
5 | className?: string;
|
6 | style?: React.CSSProperties;
|
7 | }
|
8 | export default class SearchBar extends React.Component<SearchBarProps, SearchBarState> {
|
9 | static defaultProps: {
|
10 | prefixCls: string;
|
11 | placeholder: string;
|
12 | onSubmit: () => void;
|
13 | onChange: () => void;
|
14 | onFocus: () => void;
|
15 | onBlur: () => void;
|
16 | onClear: () => void;
|
17 | showCancelButton: boolean;
|
18 | disabled: boolean;
|
19 | };
|
20 | rightBtnInitMarginleft: string | null;
|
21 | firstFocus: boolean;
|
22 | blurFromOnClear: boolean;
|
23 | onBlurTimeout: number | null;
|
24 | inputRef: HTMLInputElement | null;
|
25 | private rightBtnRef;
|
26 | private syntheticPhContainerRef;
|
27 | private syntheticPhRef;
|
28 | private inputContainerRef;
|
29 | constructor(props: SearchBarProps);
|
30 | componentDidMount(): void;
|
31 | componentDidUpdate(): void;
|
32 | componentWillReceiveProps(nextProps: SearchBarProps): void;
|
33 | componentWillUnmount(): void;
|
34 | onSubmit: (e: React.FormEvent<HTMLFormElement>) => void;
|
35 | onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
36 | onFocus: () => void;
|
37 | onBlur: () => void;
|
38 | onClear: () => void;
|
39 | doClear: (blurFromOnClear?: boolean) => void;
|
40 | onCancel: () => void;
|
41 | focus: () => void;
|
42 | render(): JSX.Element;
|
43 | }
|