mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
min/max to web value edit
This commit is contained in:
@@ -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>
|
||||
}}
|
||||
|
||||
@@ -133,6 +133,8 @@ export interface DeviceValue {
|
||||
l: string[]; // list
|
||||
h?: string; // help text
|
||||
s?: string; // steps for up/down
|
||||
m?: string; // min
|
||||
x?: string; // max
|
||||
}
|
||||
|
||||
export interface DeviceData {
|
||||
|
||||
Reference in New Issue
Block a user