Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] Integrate searchSessionId into Lens app #86297

Merged
merged 11 commits into from
Dec 29, 2020
Prev Previous commit
Next Next commit
✨ use session id for suggestions
  • Loading branch information
dej611 committed Dec 17, 2020
commit 928687bf568849070ec8a7ae7da48404cf35819b
Original file line number Diff line number Diff line change
@@ -273,10 +273,15 @@ export function SuggestionPanel({
const AutoRefreshExpressionRenderer = useMemo(() => {
const autoRefreshFetch$ = plugins.data.query.timefilter.timefilter.getAutoRefreshFetch$();
return (props: ReactExpressionRendererProps) => (
<ExpressionRendererComponent {...props} searchContext={context} reload$={autoRefreshFetch$} />
<ExpressionRendererComponent
{...props}
searchContext={context}
reload$={autoRefreshFetch$}
searchSessionId={frame.searchSessionId}
/>
);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [plugins.data.query.timefilter.timefilter, context]);
}, [plugins.data.query.timefilter.timefilter, context, frame.searchSessionId]);

const [lastSelectedSuggestion, setLastSelectedSuggestion] = useState<number>(-1);