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