diff --git a/public/components/common/search/query_area.tsx b/public/components/common/search/query_area.tsx index ffa486a366..a298e546ae 100644 --- a/public/components/common/search/query_area.tsx +++ b/public/components/common/search/query_area.tsx @@ -12,6 +12,7 @@ import { useFetchEvents } from '../../event_analytics/hooks/use_fetch_events'; export function QueryArea({ tabId, handleQueryChange, + handleTimePickerChange, handleTimeRangePickerRefresh, runQuery, tempQuery, @@ -66,6 +67,7 @@ export function QueryArea({ { void; handleTimeRangePickerRefresh: (availability?: boolean, setSummaryStatus?: boolean) => void; + handleTimePickerChange: (timeRange: string[]) => Promise; tabId: string; setNeedsUpdate: any; selectedIndex: Array>; @@ -246,6 +248,7 @@ export const QueryAssistInput: React.FC = (props) => { try { setGeneratingOrRunning(true); await request(); + await props.handleTimePickerChange([QUERY_ASSIST_START_TIME, 'now']); await props.handleTimeRangePickerRefresh(undefined, true); } catch (error) { generateSummary({ isError: true, response: JSON.stringify((error as ResponseError).body) });