mocker
mocker copied to clipboard
Set filed's option problem
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.
useEffect(() => {
- handleSchema(fieldInfo.id, fieldInfo.label, fieldInfo.field, option);
+ handleSchema(fieldInfo.id, fieldInfo.label, fieldInfo.field, fieldInfo.name, option);
console.log('Im', option);
}, [option]);
const handleSchema = (id, label, field, name, option) => {
// ...
}