show gpio for system sensors

This commit is contained in:
proddy
2025-11-15 20:45:33 +01:00
parent 0b33497842
commit 23782ec773

View File

@@ -158,21 +158,31 @@ const SensorsAnalogDialog = ({
<DialogTitle>{dialogTitle}</DialogTitle> <DialogTitle>{dialogTitle}</DialogTitle>
<DialogContent dividers> <DialogContent dividers>
<Grid container spacing={2}> <Grid container spacing={2}>
<ValidatedTextField {editItem.s ? (
name="g" <TextField
label="GPIO" name="g"
value={editItem.g} label="GPIO"
sx={{ width: '8ch' }} value={editItem.g}
select sx={{ width: '8ch' }}
onChange={updateFormValue} disabled={true}
disabled={editItem.s} ></TextField>
> ) : (
{analogGPIOList?.map((gpio: number) => ( <ValidatedTextField
<MenuItem key={gpio} value={gpio}> name="g"
{gpio} label="GPIO"
</MenuItem> value={editItem.g}
))} sx={{ width: '8ch' }}
</ValidatedTextField> select
onChange={updateFormValue}
disabled={editItem.s}
>
{analogGPIOList?.map((gpio: number) => (
<MenuItem key={gpio} value={gpio}>
{gpio}
</MenuItem>
))}
</ValidatedTextField>
)}
<Grid> <Grid>
<ValidatedTextField <ValidatedTextField
name="n" name="n"