office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
34 lines (33 loc) • 1.06 kB
TypeScript
/// <reference types="react" />
import { ISearchBoxProps } from './SearchBox.types';
import { BaseComponent } from '../../Utilities';
export interface ISearchBoxState {
value?: string;
hasFocus?: boolean;
id?: string;
}
export declare class SearchBoxBase extends BaseComponent<ISearchBoxProps, ISearchBoxState> {
static defaultProps: Pick<ISearchBoxProps, 'disableAnimation' | 'clearButtonProps'>;
private _rootElement;
private _inputElement;
private _latestValue;
constructor(props: ISearchBoxProps);
componentWillReceiveProps(newProps: ISearchBoxProps): void;
render(): JSX.Element;
/**
* Sets focus to the search box input field
*/
focus(): void;
/**
* Returns whether or not the SearchBox has focus
*/
hasFocus(): boolean;
private _onClear(ev);
private _onClickFocus;
private _onFocusCapture;
private _onClearClick;
private _onKeyDown;
private _onBlur;
private _onInputChange;
private _callOnChange(newValue);
}