mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Metrics UI] Handle event.target properly for Legend Controls (#68029)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
a4549a71ed
commit
4fde7a69d4
1 changed files with 4 additions and 2 deletions
|
@ -141,14 +141,16 @@ export const LegendControls = ({
|
|||
|
||||
const handleStepsChange = useCallback(
|
||||
(e) => {
|
||||
setLegendOptions((previous) => ({ ...previous, steps: parseInt(e.target.value, 10) }));
|
||||
const steps = parseInt(e.target.value, 10);
|
||||
setLegendOptions((previous) => ({ ...previous, steps }));
|
||||
},
|
||||
[setLegendOptions]
|
||||
);
|
||||
|
||||
const handlePaletteChange = useCallback(
|
||||
(e) => {
|
||||
setLegendOptions((previous) => ({ ...previous, palette: e.target.value }));
|
||||
const palette = e.target.value;
|
||||
setLegendOptions((previous) => ({ ...previous, palette }));
|
||||
},
|
||||
[setLegendOptions]
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue