|
@ -41,7 +41,6 @@ function RenderPluviometerInput({ |
|
|
width, |
|
|
width, |
|
|
values, |
|
|
values, |
|
|
}) { |
|
|
}) { |
|
|
console.log(name == "pluviometer"); |
|
|
|
|
|
const [fieldVal, setFieldVal] = useState(values[name]); |
|
|
const [fieldVal, setFieldVal] = useState(values[name]); |
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
@ -49,11 +48,11 @@ function RenderPluviometerInput({ |
|
|
}, [fieldVal]); |
|
|
}, [fieldVal]); |
|
|
|
|
|
|
|
|
const increase = () => { |
|
|
const increase = () => { |
|
|
setFieldVal((Number(fieldVal) + 1).toString()); |
|
|
|
|
|
|
|
|
(Number(fieldVal) + 1) <= 999 && setFieldVal((Number(fieldVal) + 1).toString()); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const decrease = () => { |
|
|
const decrease = () => { |
|
|
setFieldVal((Number(fieldVal) - 1).toString()); |
|
|
|
|
|
|
|
|
(Number(fieldVal) - 1) >= 0 && setFieldVal((Number(fieldVal) - 1).toString()); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|