🐛 fix(intComponent): fix comparison bug in onInput event handler to correctly compare input value with min value

This commit is contained in:
Cristhian Zanforlin Lousa 2023-09-11 09:22:21 -03:00
commit 4c0874ee83

View file

@ -44,7 +44,7 @@ export default function IntComponent({
step="1"
min={min}
onInput={(event: React.ChangeEvent<HTMLInputElement>) => {
if (event.target.value < min.toString()) {
if (Number(event.target.value) < min) {
event.target.value = min.toString();
}
}}