Skip to content

Commit af46fc6

Browse files
committed
fix(ant):r remove name from form.item to use layout component
1 parent af0fcf6 commit af46fc6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/ant-component-mapper/demo/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const App = () => (
2323
componentMapper={componentMapper}
2424
FormTemplate={(props) => <FormTemplate layout='vertical' {...props} />}
2525
onSubmit={console.log}
26-
schema={fieldArraySchema}
26+
schema={wizardSchema}
2727
/>
2828
</div>
2929
);

packages/ant-component-mapper/src/common/form-wrapper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const AntForm = ({ label, children, isRequired, FormItemProps, meta, validateOnM
1010
const help = invalid || helperText || description;
1111

1212
return (
13-
<Form.Item validateStatus={!invalid ? '' : 'error'} help={help} label={!hideLabel && label} name={label} required={isRequired} {...FormItemProps}>
14-
<div>{children}</div>
13+
<Form.Item validateStatus={!invalid ? '' : 'error'} help={help} label={!hideLabel && label} required={isRequired} {...FormItemProps}>
14+
{children}
1515
</Form.Item>
1616
);
1717
};

0 commit comments

Comments
 (0)