[v9.3.x] OptionsUI: SliderValueEditor does not get auto focused on slider change (#59368)
OptionsUI: SliderValueEditor does not get auto focused on slider change (#59209)
(cherry picked from commit 45d3125919)
Co-authored-by: Laura Fernández <laura.fernandez@grafana.com>
This commit is contained in:
co-authored by
Laura Fernández
parent
e0cf9e4331
commit
7ab181383b
@@ -87,7 +87,11 @@
|
||||
"ignoreNonDOM": true
|
||||
}
|
||||
],
|
||||
"jsx-a11y/no-static-element-interactions": "off"
|
||||
"jsx-a11y/no-static-element-interactions": "off",
|
||||
"jsx-a11y/label-has-associated-control": [ "error", {
|
||||
"controlComponents": ["NumberInput"],
|
||||
"depth": 2
|
||||
}]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -96,7 +96,7 @@ export const SliderValueEditor: React.FC<FieldConfigEditorProps<number, SliderFi
|
||||
<div className={cx(styles.container, styles.slider)}>
|
||||
{/** Slider tooltip's parent component is body and therefore we need Global component to do css overrides for it. */}
|
||||
<Global styles={styles.slider} />
|
||||
<div className={cx(styles.sliderInput, ...sliderInputClassNames)}>
|
||||
<label className={cx(styles.sliderInput, ...sliderInputClassNames)}>
|
||||
<Slider
|
||||
min={min}
|
||||
max={max}
|
||||
@@ -113,7 +113,7 @@ export const SliderValueEditor: React.FC<FieldConfigEditorProps<number, SliderFi
|
||||
<span className={stylesSlider.numberInputWrapper} ref={inputRef}>
|
||||
<NumberInput value={sliderValue} onChange={onSliderInputChange} max={max} min={min} step={step} />
|
||||
</span>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user