/// import React, { Component } from 'react'; import '../../Components/SearchBox/RealTimeSearchBox.css'; declare type Props = { /** Class name to include with default class name */ className?: string; /** Set the autofocus property of the underlying HTMLTextInputElement */ autoFocus?: boolean; /** Initial search text; defaults to ''. After mounting, search text is maintained by the component */ searchTerm?: string; /** Called when user alters text in the search box */ onSearchTermChange?: (searchTerm: string) => void; /** The placeholder string if no search text is present; defaults to ''. */ placeholderText?: string; /** Icon name to show in input box. Defaults to "search". */ iconName?: string; /** Text to appear as tooltip of help icon, should describe how the search is performed. Defaults to empty (no icon) */ helpText?: string; /** Delay in milliseconds after last character typed until onSearchTermChange is called. Defaults to 250. */ delayMs?: number; /** Additional right positioning for the "cancel" button when used in DataTable's column filters */ cancelBtnRightMargin?: React.CSSProperties['right']; }; declare type State = { /** local reference to search term for rendering */ searchTerm: string; }; /** * A 'real time' search box. Changes are throttled by 'debounce' so text * change events are delayed to prevent repetitive costly searching. Useful * when expensive operations are performed (e.g. search) in real time as the * user types in the box. Also provides reset button to clear the box. */ export default class RealTimeSearchBox extends Component { static defaultProps: { className: string; autoFocus: boolean; searchTerm: string; onSearchTermChange: () => void; placeholderText: string; helpText: string; delayMs: number; iconName: string; }; emitSearchTermChange: import("lodash").DebouncedFunc<(searchTerm: string) => void>; input: HTMLInputElement | null; constructor(props: Props); componentDidMount(): void; componentWillReceiveProps(nextProps: Props): void; componentWillUnmount(): void; /** * Update the state of this Component, and call debounced onSearchTermSet * callback. */ handleSearchTermChange(e: React.ChangeEvent): void; /** * Reset input if Escape is pressed. */ handleKeyDown(e: React.KeyboardEvent): void; /** * Update the state of this Component, and call onSearchTermSet callback * immediately. */ handleResetClick(): void; render(): JSX.Element; } export {}; //# sourceMappingURL=RealTimeSearchBox.d.ts.map