min/max to web value edit

This commit is contained in:
MichaelDvP
2022-03-21 20:21:55 +01:00
parent 4ae406b3e1
commit a0a3d8ef3a
3 changed files with 8 additions and 1 deletions

View File

@@ -239,7 +239,7 @@ const DashboardData: FC = () => {
sx={{ width: '30ch' }}
type={deviceValue.u ? 'number' : 'text'}
onChange={updateValue(setDeviceValue)}
inputProps={{ step: deviceValue.s }}
inputProps={deviceValue.u ? { min: deviceValue.m, max: deviceValue.x, step: deviceValue.s } : {}}
InputProps={{
startAdornment: <InputAdornment position="start">{DeviceValueUOM_s[deviceValue.u]}</InputAdornment>
}}