{"action":"created","issue":{"url":"https://api.github.com/repos/marmelab/admin-on-rest/issues/16","repository_url":"https://api.github.com/repos/marmelab/admin-on-rest","labels_url":"https://api.github.com/repos/marmelab/admin-on-rest/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/marmelab/admin-on-rest/issues/16/comments","events_url":"https://api.github.com/repos/marmelab/admin-on-rest/issues/16/events","html_url":"https://github.com/marmelab/admin-on-rest/pull/16","id":175299683,"number":16,"title":"[WIP] Move <ReferenceInput> display logic to a child component","user":{"login":"fzaninotto","id":99944,"avatar_url":"https://avatars.githubusercontent.com/u/99944?v=3","gravatar_id":"","url":"https://api.github.com/users/fzaninotto","html_url":"https://github.com/fzaninotto","followers_url":"https://api.github.com/users/fzaninotto/followers","following_url":"https://api.github.com/users/fzaninotto/following{/other_user}","gists_url":"https://api.github.com/users/fzaninotto/gists{/gist_id}","starred_url":"https://api.github.com/users/fzaninotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzaninotto/subscriptions","organizations_url":"https://api.github.com/users/fzaninotto/orgs","repos_url":"https://api.github.com/users/fzaninotto/repos","events_url":"https://api.github.com/users/fzaninotto/events{/privacy}","received_events_url":"https://api.github.com/users/fzaninotto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-06T17:05:05Z","updated_at":"2016-09-06T17:50:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/marmelab/admin-on-rest/pulls/16","html_url":"https://github.com/marmelab/admin-on-rest/pull/16","diff_url":"https://github.com/marmelab/admin-on-rest/pull/16.diff","patch_url":"https://github.com/marmelab/admin-on-rest/pull/16.patch"},"body":"Just like the recent `<ReferenceField>` refactoring, this change aims to remove the display responsibility out of the `<ReferenceInput>` component and to its child.\r\n\r\nBefore:\r\n\r\n```js\r\nexport const CommentEdit = (props) => (\r\n    <Edit {...props}>\r\n        <DisabledInput label=\"id\" source=\"id\" />\r\n        <ReferenceInput label=\"Post\" source=\"post_id\" reference=\"posts\" referenceSource=\"title\" />\r\n        <DateInput label=\"date\" source=\"created_at\" />\r\n        <LongTextInput label=\"body\" source=\"body\" />\r\n    </Edit>\r\n);\r\n```\r\n\r\nAfter:\r\n\r\n```js\r\nexport const CommentEdit = (props) => (\r\n    <Edit {...props}>\r\n        <DisabledInput label=\"id\" source=\"id\" />\r\n        <ReferenceInput label=\"Post\" source=\"post_id\" reference=\"posts\">\r\n            <SelectObjectInput property=\"title\" />\r\n        </ReferenceInput>\r\n        <DateInput label=\"date\" source=\"created_at\" />\r\n        <LongTextInput label=\"body\" source=\"body\" />\r\n    </Edit>\r\n);\r\n```\r\n\r\nIt's more verbose, but also much more powerful. Imagine how we can compose buttons list or options list instead of a select box.\r\n\r\nAlso, it's more consistent with other `Reference` components: they now *always* require a child component to display their result."},"comment":{"url":"https://api.github.com/repos/marmelab/admin-on-rest/issues/comments/245032625","html_url":"https://github.com/marmelab/admin-on-rest/pull/16#issuecomment-245032625","issue_url":"https://api.github.com/repos/marmelab/admin-on-rest/issues/16","id":245032625,"user":{"login":"fzaninotto","id":99944,"avatar_url":"https://avatars.githubusercontent.com/u/99944?v=3","gravatar_id":"","url":"https://api.github.com/users/fzaninotto","html_url":"https://github.com/fzaninotto","followers_url":"https://api.github.com/users/fzaninotto/followers","following_url":"https://api.github.com/users/fzaninotto/following{/other_user}","gists_url":"https://api.github.com/users/fzaninotto/gists{/gist_id}","starred_url":"https://api.github.com/users/fzaninotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzaninotto/subscriptions","organizations_url":"https://api.github.com/users/fzaninotto/orgs","repos_url":"https://api.github.com/users/fzaninotto/repos","events_url":"https://api.github.com/users/fzaninotto/events{/privacy}","received_events_url":"https://api.github.com/users/fzaninotto/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T17:50:51Z","updated_at":"2016-09-06T17:50:51Z","body":"Back to WIP, I'm not satisfied with the API"}}
{"actor":{"display_login":"fzaninotto"}}