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

@@ -17,7 +17,7 @@ import Grid from '@mui/material/Grid2';
import { dialogStyle } from 'CustomTheme';
import { useI18nContext } from 'i18n/i18n-react';
import { updateValue } from 'utils';
import { numberValue, updateValue } from 'utils';
import EntityMaskToggle from './EntityMaskToggle';
import { DeviceEntityMask } from './types';
@@ -127,8 +127,8 @@ const CustomizationsDialog = ({
<TextField
name="mi"
label={LL.MIN()}
value={editItem.mi}
sx={{ width: '8ch' }}
value={numberValue(editItem.mi)}
sx={{ width: '11ch' }}
type="number"
onChange={updateFormValue}
/>
@@ -137,8 +137,8 @@ const CustomizationsDialog = ({
<TextField
name="ma"
label={LL.MAX()}
value={editItem.ma}
sx={{ width: '8ch' }}
value={numberValue(editItem.ma)}
sx={{ width: '11ch' }}
type="number"
onChange={updateFormValue}
/>