mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-10 17:59:53 +03:00
avoid strange, long decimals in input field
This commit is contained in:
@@ -508,7 +508,7 @@ const DashboardData: FC = () => {
|
|||||||
<ValidatedTextField
|
<ValidatedTextField
|
||||||
name="v"
|
name="v"
|
||||||
label={deviceValue.id.slice(2)}
|
label={deviceValue.id.slice(2)}
|
||||||
value={deviceValue.u ? numberValue(deviceValue.v) : deviceValue.v}
|
value={typeof deviceValue.v === 'number' ? (Math.round(deviceValue.v * 10) / 10) : deviceValue.v}
|
||||||
autoFocus
|
autoFocus
|
||||||
multiline={deviceValue.u ? false : true}
|
multiline={deviceValue.u ? false : true}
|
||||||
sx={{ width: '30ch' }}
|
sx={{ width: '30ch' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user