From d745644d8391b3389b4cf805b79bf87acbf8f615 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Fri, 22 Jan 2016 15:00:37 +0800 Subject: [PATCH] feat: add id to child automatically --- components/form/FormItem.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx index 7fe5886271..7119ce79fc 100644 --- a/components/form/FormItem.jsx +++ b/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 [