mocker icon indicating copy to clipboard operation
mocker copied to clipboard

Set filed's option problem

Open yangwawa0323 opened this issue 2 years ago • 4 comments

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) => {            
    // ...
}

WeChat Screenshot_20230203214027

yangwawa0323 avatar Feb 03 '23 11:02 yangwawa0323