From 3d7439d97d97f3fb0fa2860e6011c0ebcf9d073e Mon Sep 17 00:00:00 2001 From: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com> Date: Mon, 24 Oct 2022 16:27:56 +0200 Subject: [PATCH] Loki: Fix input history (#57344) --- .../loki/components/AnnotationsQueryEditor.tsx | 4 ++-- .../loki/components/LokiQueryEditorForAlerting.tsx | 4 ++-- .../components/LokiQueryCodeEditor.tsx | 14 ++++++++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/public/app/plugins/datasource/loki/components/AnnotationsQueryEditor.tsx b/public/app/plugins/datasource/loki/components/AnnotationsQueryEditor.tsx index d1847251b60..17bfd1a685e 100644 --- a/public/app/plugins/datasource/loki/components/AnnotationsQueryEditor.tsx +++ b/public/app/plugins/datasource/loki/components/AnnotationsQueryEditor.tsx @@ -18,7 +18,7 @@ type Props = LokiQueryEditorProps & { }; export const LokiAnnotationsQueryEditor = memo(function LokiAnnotationQueryEditor(props: Props) { - const { annotation, onAnnotationChange } = props; + const { annotation, onAnnotationChange, history } = props; // this should never happen, but we want to keep typescript happy if (annotation === undefined || onAnnotationChange === undefined) { @@ -56,7 +56,7 @@ export const LokiAnnotationsQueryEditor = memo(function LokiAnnotationQueryEdito onChange={onChangeQuery} onRunQuery={() => {}} onBlur={() => {}} - history={[]} + history={history} ExtraFieldElement={