1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-31 13:47:02 +02:00

feat: now pressing enter will submit the new rollout percentage (#9995)

This commit is contained in:
Jaanus Sellin 2025-05-14 15:01:55 +03:00 committed by GitHub
parent a0e4f08507
commit ba80c925e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -139,6 +139,13 @@ const RolloutSlider = ({
}
};
const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
if (e.key === 'Enter') {
e.preventDefault();
handleInputBlur();
}
};
return (
<SliderWrapper>
<StyledBox>
@ -213,6 +220,7 @@ const RolloutSlider = ({
value={inputValue}
onChange={handleInputChange}
onBlur={handleInputBlur}
onKeyDown={handleKeyDown}
disabled={disabled}
inputProps={{
min: 0,