From 2d5e675d4eb5837b9d5a39d5b5a6b90ef004cc71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 4 May 2020 13:37:43 +0200 Subject: [PATCH] PanelEdit: Fixed scroll pos moved to top when clicking new radio buttons (#24146) --- packages/grafana-data/src/field/fieldOverrides.ts | 1 + .../src/components/Forms/RadioButtonGroup/RadioButton.tsx | 2 -- .../dashboard/components/PanelEditor/OptionsPaneContent.tsx | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/grafana-data/src/field/fieldOverrides.ts b/packages/grafana-data/src/field/fieldOverrides.ts index c103e803bc5..866f1552b95 100644 --- a/packages/grafana-data/src/field/fieldOverrides.ts +++ b/packages/grafana-data/src/field/fieldOverrides.ts @@ -46,6 +46,7 @@ export function findNumericFieldMinMax(data: DataFrame[]): GlobalMinMax { let max = Number.MIN_VALUE; const reducers = [ReducerID.min, ReducerID.max]; + for (const frame of data) { for (const field of frame.fields) { if (field.type === FieldType.number) { diff --git a/packages/grafana-ui/src/components/Forms/RadioButtonGroup/RadioButton.tsx b/packages/grafana-ui/src/components/Forms/RadioButtonGroup/RadioButton.tsx index 16b71feeaf2..5ceccd9e7ce 100644 --- a/packages/grafana-ui/src/components/Forms/RadioButtonGroup/RadioButton.tsx +++ b/packages/grafana-ui/src/components/Forms/RadioButtonGroup/RadioButton.tsx @@ -44,8 +44,6 @@ const getRadioButtonStyles = stylesFactory((theme: GrafanaTheme, size: RadioButt return { radio: css` position: absolute; - top: 0; - left: -100vw; opacity: 0; z-index: -1000; diff --git a/public/app/features/dashboard/components/PanelEditor/OptionsPaneContent.tsx b/public/app/features/dashboard/components/PanelEditor/OptionsPaneContent.tsx index b5cd598fc04..a05c67dad54 100644 --- a/public/app/features/dashboard/components/PanelEditor/OptionsPaneContent.tsx +++ b/public/app/features/dashboard/components/PanelEditor/OptionsPaneContent.tsx @@ -98,7 +98,7 @@ export const OptionsPaneContent: React.FC = ({ /> - + {showMainTab ? (