This commit is contained in:
MichaelDvP
2024-02-03 14:59:14 +01:00
parent 38e08be752
commit d32178480d

View File

@@ -26,7 +26,7 @@ import type { ValidateFieldsError } from 'async-validator';
import { dialogStyle } from 'CustomTheme'; import { dialogStyle } from 'CustomTheme';
import { ValidatedTextField } from 'components'; import { ValidatedTextField } from 'components';
import { useI18nContext } from 'i18n/i18n-react'; import { useI18nContext } from 'i18n/i18n-react';
import { updateValue } from 'utils'; import { updateValue, numberValue } from 'utils';
import { validate } from 'validators'; import { validate } from 'validators';
@@ -133,7 +133,7 @@ const DashboardDevicesDialog = ({
fieldErrors={fieldErrors} fieldErrors={fieldErrors}
name="v" name="v"
label={LL.VALUE(1)} label={LL.VALUE(1)}
value={Math.round(editItem.v * 10) / 10} value={numberValue(Math.round(editItem.v * 10) / 10)}
autoFocus autoFocus
disabled={!writeable} disabled={!writeable}
type="number" type="number"