mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-04 13:48:56 +02:00
feat: now pressing enter will submit the new rollout percentage (#9995)
This commit is contained in:
parent
a0e4f08507
commit
ba80c925e7
@ -139,6 +139,13 @@ const RolloutSlider = ({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
e.preventDefault();
|
||||||
|
handleInputBlur();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SliderWrapper>
|
<SliderWrapper>
|
||||||
<StyledBox>
|
<StyledBox>
|
||||||
@ -213,6 +220,7 @@ const RolloutSlider = ({
|
|||||||
value={inputValue}
|
value={inputValue}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
onBlur={handleInputBlur}
|
onBlur={handleInputBlur}
|
||||||
|
onKeyDown={handleKeyDown}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
inputProps={{
|
inputProps={{
|
||||||
min: 0,
|
min: 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user