use numberValue() to prevent web errors with integers

This commit is contained in:
proddy
2024-09-01 12:29:23 +02:00
parent 1d45a08668
commit 94d1aa56b1
4 changed files with 18 additions and 23 deletions

View File

@@ -91,7 +91,7 @@ const SensorsAnalogDialog = ({
fieldErrors={fieldErrors}
name="g"
label="GPIO"
sx={{ width: '15ch' }}
sx={{ width: '11ch' }}
value={numberValue(editItem.g)}
type="number"
variant="outlined"
@@ -157,7 +157,7 @@ const SensorsAnalogDialog = ({
label={LL.OFFSET()}
value={numberValue(editItem.o)}
type="number"
sx={{ width: '15ch' }}
sx={{ width: '11ch' }}
variant="outlined"
onChange={updateFormValue}
slotProps={{
@@ -178,7 +178,7 @@ const SensorsAnalogDialog = ({
label={LL.STARTVALUE()}
value={numberValue(editItem.o)}
type="number"
sx={{ width: '15ch' }}
sx={{ width: '11ch' }}
variant="outlined"
onChange={updateFormValue}
slotProps={{
@@ -193,7 +193,7 @@ const SensorsAnalogDialog = ({
name="f"
label={LL.FACTOR()}
value={numberValue(editItem.f)}
sx={{ width: '15ch' }}
sx={{ width: '11ch' }}
type="number"
variant="outlined"
onChange={updateFormValue}
@@ -210,7 +210,7 @@ const SensorsAnalogDialog = ({
name="o"
label={LL.VALUE(0)}
value={numberValue(editItem.o)}
fullWidth
sx={{ width: '11ch' }}
type="number"
variant="outlined"
onChange={updateFormValue}
@@ -281,7 +281,7 @@ const SensorsAnalogDialog = ({
value={numberValue(editItem.f)}
type="number"
variant="outlined"
sx={{ width: '15ch' }}
sx={{ width: '11ch' }}
onChange={updateFormValue}
slotProps={{
input: {
@@ -299,7 +299,7 @@ const SensorsAnalogDialog = ({
label={LL.DUTY_CYCLE()}
value={numberValue(editItem.o)}
type="number"
sx={{ width: '15ch' }}
sx={{ width: '11ch' }}
variant="outlined"
onChange={updateFormValue}
slotProps={{