{"action":"created","comment":{"url":"https://api.github.com/repos/ant-design/ant-design/pulls/comments/51248790","id":51248790,"diff_hunk":"@@ -120,12 +122,23 @@ class FormItem extends React.Component {\n   }\n \n   renderChildren() {\n+    const context = this.context;\n     const props = this.props;\n     const children = React.Children.map(props.children, (child) => {\n+      // If <Component />&nbsp;&nbsp;&nbsp;<Component />,\n+      // React will not convert &nbsp;&nbsp;&nbsp; into component.\n+      if (!child.type) {\n+        return child;\n+      }\n+\n+      const childProps = {};\n       if (typeof child.type === 'function' && !child.props.size) {\n-        return React.cloneElement(child, { size: 'large' });\n+        objectAssign(childProps, { size: 'large' });\n+      }\n+      if (context.form && this.getId()) {\n+        objectAssign(childProps, context.form.getFieldProps(this.getId(), props.fieldOption));","path":"components/form/FormItem.jsx","position":53,"original_position":53,"commit_id":"bb894be034d248748956fee703c8af4b1dcc7310","original_commit_id":"bb894be034d248748956fee703c8af4b1dcc7310","user":{"login":"yiminghe","id":200876,"avatar_url":"https://avatars.githubusercontent.com/u/200876?v=3","gravatar_id":"","url":"https://api.github.com/users/yiminghe","html_url":"https://github.com/yiminghe","followers_url":"https://api.github.com/users/yiminghe/followers","following_url":"https://api.github.com/users/yiminghe/following{/other_user}","gists_url":"https://api.github.com/users/yiminghe/gists{/gist_id}","starred_url":"https://api.github.com/users/yiminghe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiminghe/subscriptions","organizations_url":"https://api.github.com/users/yiminghe/orgs","repos_url":"https://api.github.com/users/yiminghe/repos","events_url":"https://api.github.com/users/yiminghe/events{/privacy}","received_events_url":"https://api.github.com/users/yiminghe/received_events","type":"User","site_admin":false},"body":"rc-form 0.10.2","created_at":"2016-01-29T11:00:47Z","updated_at":"2016-01-29T11:00:47Z","html_url":"https://github.com/ant-design/ant-design/pull/957#discussion_r51248790","pull_request_url":"https://api.github.com/repos/ant-design/ant-design/pulls/957","_links":{"self":{"href":"https://api.github.com/repos/ant-design/ant-design/pulls/comments/51248790"},"html":{"href":"https://github.com/ant-design/ant-design/pull/957#discussion_r51248790"},"pull_request":{"href":"https://api.github.com/repos/ant-design/ant-design/pulls/957"}}},"pull_request":{"url":"https://api.github.com/repos/ant-design/ant-design/pulls/957","id":57598871,"html_url":"https://github.com/ant-design/ant-design/pull/957","diff_url":"https://github.com/ant-design/ant-design/pull/957.diff","patch_url":"https://github.com/ant-design/ant-design/pull/957.patch","issue_url":"https://api.github.com/repos/ant-design/ant-design/issues/957","number":957,"state":"open","locked":false,"title":"feat: make Form validation work with Modal","user":{"login":"benjycui","id":3580607,"avatar_url":"https://avatars.githubusercontent.com/u/3580607?v=3","gravatar_id":"","url":"https://api.github.com/users/benjycui","html_url":"https://github.com/benjycui","followers_url":"https://api.github.com/users/benjycui/followers","following_url":"https://api.github.com/users/benjycui/following{/other_user}","gists_url":"https://api.github.com/users/benjycui/gists{/gist_id}","starred_url":"https://api.github.com/users/benjycui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjycui/subscriptions","organizations_url":"https://api.github.com/users/benjycui/orgs","repos_url":"https://api.github.com/users/benjycui/repos","events_url":"https://api.github.com/users/benjycui/events{/privacy}","received_events_url":"https://api.github.com/users/benjycui/received_events","type":"User","site_admin":false},"body":"Ping @yiminghe ","created_at":"2016-01-29T02:36:55Z","updated_at":"2016-01-29T11:00:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c9d0dfd18d692839a4b73ab2e36fdd14295b506","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ant-design/ant-design/pulls/957/commits","review_comments_url":"https://api.github.com/repos/ant-design/ant-design/pulls/957/comments","review_comment_url":"https://api.github.com/repos/ant-design/ant-design/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/957/comments","statuses_url":"https://api.github.com/repos/ant-design/ant-design/statuses/bb894be034d248748956fee703c8af4b1dcc7310","head":{"label":"ant-design:feat-form","ref":"feat-form","sha":"bb894be034d248748956fee703c8af4b1dcc7310","user":{"login":"ant-design","id":12101536,"avatar_url":"https://avatars.githubusercontent.com/u/12101536?v=3","gravatar_id":"","url":"https://api.github.com/users/ant-design","html_url":"https://github.com/ant-design","followers_url":"https://api.github.com/users/ant-design/followers","following_url":"https://api.github.com/users/ant-design/following{/other_user}","gists_url":"https://api.github.com/users/ant-design/gists{/gist_id}","starred_url":"https://api.github.com/users/ant-design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ant-design/subscriptions","organizations_url":"https://api.github.com/users/ant-design/orgs","repos_url":"https://api.github.com/users/ant-design/repos","events_url":"https://api.github.com/users/ant-design/events{/privacy}","received_events_url":"https://api.github.com/users/ant-design/received_events","type":"Organization","site_admin":false},"repo":{"id":34526884,"name":"ant-design","full_name":"ant-design/ant-design","owner":{"login":"ant-design","id":12101536,"avatar_url":"https://avatars.githubusercontent.com/u/12101536?v=3","gravatar_id":"","url":"https://api.github.com/users/ant-design","html_url":"https://github.com/ant-design","followers_url":"https://api.github.com/users/ant-design/followers","following_url":"https://api.github.com/users/ant-design/following{/other_user}","gists_url":"https://api.github.com/users/ant-design/gists{/gist_id}","starred_url":"https://api.github.com/users/ant-design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ant-design/subscriptions","organizations_url":"https://api.github.com/users/ant-design/orgs","repos_url":"https://api.github.com/users/ant-design/repos","events_url":"https://api.github.com/users/ant-design/events{/privacy}","received_events_url":"https://api.github.com/users/ant-design/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ant-design/ant-design","description":"A design language","fork":false,"url":"https://api.github.com/repos/ant-design/ant-design","forks_url":"https://api.github.com/repos/ant-design/ant-design/forks","keys_url":"https://api.github.com/repos/ant-design/ant-design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ant-design/ant-design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ant-design/ant-design/teams","hooks_url":"https://api.github.com/repos/ant-design/ant-design/hooks","issue_events_url":"https://api.github.com/repos/ant-design/ant-design/issues/events{/number}","events_url":"https://api.github.com/repos/ant-design/ant-design/events","assignees_url":"https://api.github.com/repos/ant-design/ant-design/assignees{/user}","branches_url":"https://api.github.com/repos/ant-design/ant-design/branches{/branch}","tags_url":"https://api.github.com/repos/ant-design/ant-design/tags","blobs_url":"https://api.github.com/repos/ant-design/ant-design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ant-design/ant-design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ant-design/ant-design/git/refs{/sha}","trees_url":"https://api.github.com/repos/ant-design/ant-design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ant-design/ant-design/statuses/{sha}","languages_url":"https://api.github.com/repos/ant-design/ant-design/languages","stargazers_url":"https://api.github.com/repos/ant-design/ant-design/stargazers","contributors_url":"https://api.github.com/repos/ant-design/ant-design/contributors","subscribers_url":"https://api.github.com/repos/ant-design/ant-design/subscribers","subscription_url":"https://api.github.com/repos/ant-design/ant-design/subscription","commits_url":"https://api.github.com/repos/ant-design/ant-design/commits{/sha}","git_commits_url":"https://api.github.com/repos/ant-design/ant-design/git/commits{/sha}","comments_url":"https://api.github.com/repos/ant-design/ant-design/comments{/number}","issue_comment_url":"https://api.github.com/repos/ant-design/ant-design/issues/comments{/number}","contents_url":"https://api.github.com/repos/ant-design/ant-design/contents/{+path}","compare_url":"https://api.github.com/repos/ant-design/ant-design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ant-design/ant-design/merges","archive_url":"https://api.github.com/repos/ant-design/ant-design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ant-design/ant-design/downloads","issues_url":"https://api.github.com/repos/ant-design/ant-design/issues{/number}","pulls_url":"https://api.github.com/repos/ant-design/ant-design/pulls{/number}","milestones_url":"https://api.github.com/repos/ant-design/ant-design/milestones{/number}","notifications_url":"https://api.github.com/repos/ant-design/ant-design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ant-design/ant-design/labels{/name}","releases_url":"https://api.github.com/repos/ant-design/ant-design/releases{/id}","deployments_url":"https://api.github.com/repos/ant-design/ant-design/deployments","created_at":"2015-04-24T15:37:24Z","updated_at":"2016-01-29T09:26:19Z","pushed_at":"2016-01-29T03:31:42Z","git_url":"git://github.com/ant-design/ant-design.git","ssh_url":"git@github.com:ant-design/ant-design.git","clone_url":"https://github.com/ant-design/ant-design.git","svn_url":"https://github.com/ant-design/ant-design","homepage":"http://ant.design/","size":46422,"stargazers_count":2330,"watchers_count":2330,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":376,"mirror_url":null,"open_issues_count":25,"forks":376,"open_issues":25,"watchers":2330,"default_branch":"master"}},"base":{"label":"ant-design:develop-0.12.0","ref":"develop-0.12.0","sha":"4ace891cd6b8e592e1c8e9e026cbb1fd1f2ca820","user":{"login":"ant-design","id":12101536,"avatar_url":"https://avatars.githubusercontent.com/u/12101536?v=3","gravatar_id":"","url":"https://api.github.com/users/ant-design","html_url":"https://github.com/ant-design","followers_url":"https://api.github.com/users/ant-design/followers","following_url":"https://api.github.com/users/ant-design/following{/other_user}","gists_url":"https://api.github.com/users/ant-design/gists{/gist_id}","starred_url":"https://api.github.com/users/ant-design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ant-design/subscriptions","organizations_url":"https://api.github.com/users/ant-design/orgs","repos_url":"https://api.github.com/users/ant-design/repos","events_url":"https://api.github.com/users/ant-design/events{/privacy}","received_events_url":"https://api.github.com/users/ant-design/received_events","type":"Organization","site_admin":false},"repo":{"id":34526884,"name":"ant-design","full_name":"ant-design/ant-design","owner":{"login":"ant-design","id":12101536,"avatar_url":"https://avatars.githubusercontent.com/u/12101536?v=3","gravatar_id":"","url":"https://api.github.com/users/ant-design","html_url":"https://github.com/ant-design","followers_url":"https://api.github.com/users/ant-design/followers","following_url":"https://api.github.com/users/ant-design/following{/other_user}","gists_url":"https://api.github.com/users/ant-design/gists{/gist_id}","starred_url":"https://api.github.com/users/ant-design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ant-design/subscriptions","organizations_url":"https://api.github.com/users/ant-design/orgs","repos_url":"https://api.github.com/users/ant-design/repos","events_url":"https://api.github.com/users/ant-design/events{/privacy}","received_events_url":"https://api.github.com/users/ant-design/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ant-design/ant-design","description":"A design language","fork":false,"url":"https://api.github.com/repos/ant-design/ant-design","forks_url":"https://api.github.com/repos/ant-design/ant-design/forks","keys_url":"https://api.github.com/repos/ant-design/ant-design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ant-design/ant-design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ant-design/ant-design/teams","hooks_url":"https://api.github.com/repos/ant-design/ant-design/hooks","issue_events_url":"https://api.github.com/repos/ant-design/ant-design/issues/events{/number}","events_url":"https://api.github.com/repos/ant-design/ant-design/events","assignees_url":"https://api.github.com/repos/ant-design/ant-design/assignees{/user}","branches_url":"https://api.github.com/repos/ant-design/ant-design/branches{/branch}","tags_url":"https://api.github.com/repos/ant-design/ant-design/tags","blobs_url":"https://api.github.com/repos/ant-design/ant-design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ant-design/ant-design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ant-design/ant-design/git/refs{/sha}","trees_url":"https://api.github.com/repos/ant-design/ant-design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ant-design/ant-design/statuses/{sha}","languages_url":"https://api.github.com/repos/ant-design/ant-design/languages","stargazers_url":"https://api.github.com/repos/ant-design/ant-design/stargazers","contributors_url":"https://api.github.com/repos/ant-design/ant-design/contributors","subscribers_url":"https://api.github.com/repos/ant-design/ant-design/subscribers","subscription_url":"https://api.github.com/repos/ant-design/ant-design/subscription","commits_url":"https://api.github.com/repos/ant-design/ant-design/commits{/sha}","git_commits_url":"https://api.github.com/repos/ant-design/ant-design/git/commits{/sha}","comments_url":"https://api.github.com/repos/ant-design/ant-design/comments{/number}","issue_comment_url":"https://api.github.com/repos/ant-design/ant-design/issues/comments{/number}","contents_url":"https://api.github.com/repos/ant-design/ant-design/contents/{+path}","compare_url":"https://api.github.com/repos/ant-design/ant-design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ant-design/ant-design/merges","archive_url":"https://api.github.com/repos/ant-design/ant-design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ant-design/ant-design/downloads","issues_url":"https://api.github.com/repos/ant-design/ant-design/issues{/number}","pulls_url":"https://api.github.com/repos/ant-design/ant-design/pulls{/number}","milestones_url":"https://api.github.com/repos/ant-design/ant-design/milestones{/number}","notifications_url":"https://api.github.com/repos/ant-design/ant-design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ant-design/ant-design/labels{/name}","releases_url":"https://api.github.com/repos/ant-design/ant-design/releases{/id}","deployments_url":"https://api.github.com/repos/ant-design/ant-design/deployments","created_at":"2015-04-24T15:37:24Z","updated_at":"2016-01-29T09:26:19Z","pushed_at":"2016-01-29T03:31:42Z","git_url":"git://github.com/ant-design/ant-design.git","ssh_url":"git@github.com:ant-design/ant-design.git","clone_url":"https://github.com/ant-design/ant-design.git","svn_url":"https://github.com/ant-design/ant-design","homepage":"http://ant.design/","size":46422,"stargazers_count":2330,"watchers_count":2330,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":376,"mirror_url":null,"open_issues_count":25,"forks":376,"open_issues":25,"watchers":2330,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ant-design/ant-design/pulls/957"},"html":{"href":"https://github.com/ant-design/ant-design/pull/957"},"issue":{"href":"https://api.github.com/repos/ant-design/ant-design/issues/957"},"comments":{"href":"https://api.github.com/repos/ant-design/ant-design/issues/957/comments"},"review_comments":{"href":"https://api.github.com/repos/ant-design/ant-design/pulls/957/comments"},"review_comment":{"href":"https://api.github.com/repos/ant-design/ant-design/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ant-design/ant-design/pulls/957/commits"},"statuses":{"href":"https://api.github.com/repos/ant-design/ant-design/statuses/bb894be034d248748956fee703c8af4b1dcc7310"}}}}