Browse Source

feat: add id to child automatically

pull/913/head
Benjy Cui 9 years ago
parent
commit
d745644d83
  1. 2
      components/form/FormItem.jsx

2
components/form/FormItem.jsx

@ -122,7 +122,7 @@ class FormItem extends React.Component {
if (context.form && props.id && props.options) {
children = React.cloneElement(
React.Children.only(children),
context.form.getFieldProps(props.id, props.options)
{ ...context.form.getFieldProps(props.id, props.options), id: props.id }
);
}
return [

Loading…
Cancel
Save