diff --git a/packages/react-schema-editor/src/components/FieldEditor.tsx b/packages/react-schema-editor/src/components/FieldEditor.tsx index ab0f585ccc1..f877491bc90 100644 --- a/packages/react-schema-editor/src/components/FieldEditor.tsx +++ b/packages/react-schema-editor/src/components/FieldEditor.tsx @@ -59,12 +59,7 @@ const FormItemGroup: React.FC = ({ const componentPropsValue = getComponentPropsValue({ schema, propsKey }) - const handleXComponentPropsValueChange = ( - value, - property, - schema, - propsKey - ) => { + const handleXComponentPropsValueChange = (value, property) => { const newSchema = { ...schema } if (propsKey === ComponentPropsTypes.X_RULES) { const newRules = _.map(schema[propsKey], rule => { @@ -83,10 +78,10 @@ const FormItemGroup: React.FC = ({ onChange(newSchema) } - const handleInputTypeChange = (inputType, property, schema, propsKey) => { + const handleInputTypeChange = (value, property) => { const newSchema = { ...schema } let defaultValue - switch (inputType) { + switch (value) { case InputTypes.INPUT: { defaultValue = '' break @@ -230,7 +225,7 @@ const FormItemGroup: React.FC = ({ handlePropertyChange(value, property) }} > - {componentPropsData.options.map(({ label, value }) => ( + {_.map(componentPropsData.options, ({ label, value }) => ( {label} @@ -245,10 +240,10 @@ const FormItemGroup: React.FC = ({