🐛 fix(intComponent): fix comparison bug in onInput event handler to correctly compare input value with min value
This commit is contained in:
parent
e6afd6704f
commit
4c0874ee83
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ export default function IntComponent({
|
||||||
step="1"
|
step="1"
|
||||||
min={min}
|
min={min}
|
||||||
onInput={(event: React.ChangeEvent<HTMLInputElement>) => {
|
onInput={(event: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
if (event.target.value < min.toString()) {
|
if (Number(event.target.value) < min) {
|
||||||
event.target.value = min.toString();
|
event.target.value = min.toString();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue