Open yangwawa0323 opened 1 year ago
When change the has optional attribute filed, the old option is keepped. In CommonResourceModal.jsx
<FormControl fullWidth>
<InputLabel id='resource-label'>Field</InputLabel>
<Select
labelId='resource-label'
id='resource-id'
sx={{ mb: 0 }}
size='small'
label='Field'
name='field'
value={item.field}
onChange={(e) => {
handleSchema(
item.id,
item.label,
e.target.value,
- e.target.value
+ e.target.name,
+ {} // For the beginning, reset the option
);
}}
>
problem has solved or not then, seems issues was already assigned to @yangwawa0323
Can u assign me i can work on this?
@yangwawa0323 In the above image only male is occuring ....so should i change that to male and female ???right??
There has a problem that is to set some optional field. I was debug by using the browser's develop tool , there is no any option field in the modified schema send to BE. By reading the source code , I found the problem where is.
In the FE SchemaOptionModal.jsx file. the 4th parameter of the useEffect which call name is missed.