interface SearchBarActionProps {
onSearch: (value: string) => any;
+ searchDataOnEnter: (value: string) => void;
debounce?: number;
onSetView: (currentView: string) => void;
closeView: () => void;
}
interface RenderRecentQueriesProps {
- text: string | JSX.Element;
- onSearch: (searchValue: string | JSX.Element) => void;
+ text: string;
+ onSearch: (searchValue: string) => void;
}
export const RenderRecentQueries = (props: RenderRecentQueriesProps) => {
};
interface RenderSavedQueriesProps {
- text: string | JSX.Element;
+ text: string;
id: number;
deleteSavedQuery: (id: number) => void;
- onSearch: (searchValue: string | JSX.Element) => void;
+ onSearch: (searchValue: string) => void;
editSavedQuery: (data: SearchBarAdvanceFormData, id: number) => void;
data: SearchBarAdvanceFormData;
}
event.preventDefault();
clearTimeout(this.timeout);
this.props.saveRecentQuery(this.state.value);
- this.props.onSearch(this.state.value);
+ this.props.searchDataOnEnter(this.state.value);
this.props.loadRecentQueries();
}