Commit 2d5e675d by Torkel Ödegaard Committed by GitHub

PanelEdit: Fixed scroll pos moved to top when clicking new radio buttons (#24146)

parent b57802e6
...@@ -46,6 +46,7 @@ export function findNumericFieldMinMax(data: DataFrame[]): GlobalMinMax { ...@@ -46,6 +46,7 @@ export function findNumericFieldMinMax(data: DataFrame[]): GlobalMinMax {
let max = Number.MIN_VALUE; let max = Number.MIN_VALUE;
const reducers = [ReducerID.min, ReducerID.max]; const reducers = [ReducerID.min, ReducerID.max];
for (const frame of data) { for (const frame of data) {
for (const field of frame.fields) { for (const field of frame.fields) {
if (field.type === FieldType.number) { if (field.type === FieldType.number) {
......
...@@ -44,8 +44,6 @@ const getRadioButtonStyles = stylesFactory((theme: GrafanaTheme, size: RadioButt ...@@ -44,8 +44,6 @@ const getRadioButtonStyles = stylesFactory((theme: GrafanaTheme, size: RadioButt
return { return {
radio: css` radio: css`
position: absolute; position: absolute;
top: 0;
left: -100vw;
opacity: 0; opacity: 0;
z-index: -1000; z-index: -1000;
......
...@@ -98,7 +98,7 @@ export const OptionsPaneContent: React.FC<Props> = ({ ...@@ -98,7 +98,7 @@ export const OptionsPaneContent: React.FC<Props> = ({
/> />
</TabsBar> </TabsBar>
<TabContent className={styles.tabContent}> <TabContent className={styles.tabContent}>
<CustomScrollbar> <CustomScrollbar autoHeightMin="100%">
{showMainTab ? ( {showMainTab ? (
<PanelOptionsTab <PanelOptionsTab
panel={panel} panel={panel}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment