Feature/amiriis azmayesh
This commit is contained in:
@@ -9,13 +9,16 @@ const InputType = ({ itemInfo, defaultValues, setDefaultValues }) => {
|
||||
[itemInfo.id]: value,
|
||||
}));
|
||||
};
|
||||
console.log(itemInfo);
|
||||
|
||||
const label = itemInfo.unit ? `${itemInfo.name} (${itemInfo.unit})` : itemInfo.name
|
||||
|
||||
return (
|
||||
<FormControl size="small" fullWidth variant="outlined">
|
||||
<InputLabel htmlFor={itemInfo.id}>{itemInfo.name}</InputLabel>
|
||||
<InputLabel htmlFor={itemInfo.id}>{label}</InputLabel>
|
||||
<OutlinedInput
|
||||
id={itemInfo.id}
|
||||
label={itemInfo.name}
|
||||
label={label}
|
||||
autoComplete="off"
|
||||
size="small"
|
||||
fullWidth
|
||||
|
||||
@@ -9,15 +9,15 @@ const SelectType = ({ itemInfo, defaultValues, setDefaultValues }) => {
|
||||
[itemInfo.id]: newValue,
|
||||
}));
|
||||
};
|
||||
|
||||
const label = itemInfo.unit ? `${itemInfo.name} (${itemInfo.unit})` : itemInfo.name
|
||||
return (
|
||||
<FormControl size="small" fullWidth variant="outlined">
|
||||
<InputLabel id={itemInfo.id}>{itemInfo.name}</InputLabel>
|
||||
<InputLabel id={itemInfo.id}>{label}</InputLabel>
|
||||
<Select
|
||||
labelId={itemInfo.id}
|
||||
id={itemInfo.id}
|
||||
value={defaultValues[itemInfo.id] || ""}
|
||||
label={itemInfo.name}
|
||||
label={label}
|
||||
onChange={handleChange}
|
||||
>
|
||||
<MenuItem value="">{itemInfo.name}</MenuItem>
|
||||
|
||||
Reference in New Issue
Block a user