From 5cecd800159882fc5a9723e62e02c554e6917161 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Fri, 9 Dec 2022 11:51:56 +0000 Subject: [PATCH 1/2] only open the menu once options are loaded for better positioning --- .../datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx b/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx index ad2abab2a39e..5024a8f96ac7 100644 --- a/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx +++ b/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx @@ -111,7 +111,7 @@ const SelSingleLoad = ({ loadOptions, allowCustomValue, onChange, onClose }: Sel isLoading={loadState.loading} formatCreateLabel={formatCreateLabel} autoFocus - isOpen + isOpen={Boolean(loadState.value)} onCloseMenu={onClose} allowCustomValue={allowCustomValue} options={loadState.value ?? []} From 66dd401ac5aece59ce37868adbb2301ab24393fa Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Fri, 9 Dec 2022 12:07:42 +0000 Subject: [PATCH 2/2] use !loadState.loading instead of Boolean(loadState.value) --- .../datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx b/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx index 5024a8f96ac7..c1ba0c6357b8 100644 --- a/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx +++ b/public/app/plugins/datasource/influxdb/components/VisualInfluxQLEditor/Seg.tsx @@ -111,7 +111,7 @@ const SelSingleLoad = ({ loadOptions, allowCustomValue, onChange, onClose }: Sel isLoading={loadState.loading} formatCreateLabel={formatCreateLabel} autoFocus - isOpen={Boolean(loadState.value)} + isOpen={!loadState.loading} onCloseMenu={onClose} allowCustomValue={allowCustomValue} options={loadState.value ?? []}