{"action":"closed","number":328,"pull_request":{"url":"https://api.github.com/repos/JedWatson/react-select/pulls/328","id":40563113,"html_url":"https://github.com/JedWatson/react-select/pull/328","diff_url":"https://github.com/JedWatson/react-select/pull/328.diff","patch_url":"https://github.com/JedWatson/react-select/pull/328.patch","issue_url":"https://api.github.com/repos/JedWatson/react-select/issues/328","number":328,"state":"closed","locked":false,"title":"Extract option, value and single value to components and allow getting customized ones","user":{"login":"jniechcial","id":6025462,"avatar_url":"https://avatars.githubusercontent.com/u/6025462?v=3","gravatar_id":"","url":"https://api.github.com/users/jniechcial","html_url":"https://github.com/jniechcial","followers_url":"https://api.github.com/users/jniechcial/followers","following_url":"https://api.github.com/users/jniechcial/following{/other_user}","gists_url":"https://api.github.com/users/jniechcial/gists{/gist_id}","starred_url":"https://api.github.com/users/jniechcial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jniechcial/subscriptions","organizations_url":"https://api.github.com/users/jniechcial/orgs","repos_url":"https://api.github.com/users/jniechcial/repos","events_url":"https://api.github.com/users/jniechcial/events{/privacy}","received_events_url":"https://api.github.com/users/jniechcial/received_events","type":"User","site_admin":false},"body":"I recently bumped into case where we needed to make some customization of options and values render. I checked the options that are provided (similar to select2 formatResult) and somehow probably would deal with it this way.\r\n\r\nHowever, I am pretty sure that better solution would be to wrap all these parts that often demands customization (like option/value renders) into components that can be provided via props by the user. Of course, they would need to handle proper API that should be documented.\r\n\r\nThis way, eventually react-select would become free of tens of customization props (classes, formaters, etc.). All of this could be handled directly by the user providing customized components based on default ones and handle basically every edge customization case.\r\n\r\nWhat do you think? I prepared a fork that meets my requirements and is ready to merge, despite the lack of additional documentation that I can add. There is also an additional example showing how it can be useful with integrating 3rd-party components (in this example its [react-gravatar](https://github.com/KyleAMathews/react-gravatar).\r\n\r\nI would love to hear your opinion.","created_at":"2015-07-22T13:14:37Z","updated_at":"2015-08-02T15:50:44Z","closed_at":"2015-08-02T15:50:44Z","merged_at":null,"merge_commit_sha":"adb353bfeafedc97ce22a36c5ace445af4f94050","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JedWatson/react-select/pulls/328/commits","review_comments_url":"https://api.github.com/repos/JedWatson/react-select/pulls/328/comments","review_comment_url":"https://api.github.com/repos/JedWatson/react-select/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JedWatson/react-select/issues/328/comments","statuses_url":"https://api.github.com/repos/JedWatson/react-select/statuses/8eacac4b77ab0f42cec1341d3810e40e67de3341","head":{"label":"jniechcial:master","ref":"master","sha":"8eacac4b77ab0f42cec1341d3810e40e67de3341","user":{"login":"jniechcial","id":6025462,"avatar_url":"https://avatars.githubusercontent.com/u/6025462?v=3","gravatar_id":"","url":"https://api.github.com/users/jniechcial","html_url":"https://github.com/jniechcial","followers_url":"https://api.github.com/users/jniechcial/followers","following_url":"https://api.github.com/users/jniechcial/following{/other_user}","gists_url":"https://api.github.com/users/jniechcial/gists{/gist_id}","starred_url":"https://api.github.com/users/jniechcial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jniechcial/subscriptions","organizations_url":"https://api.github.com/users/jniechcial/orgs","repos_url":"https://api.github.com/users/jniechcial/repos","events_url":"https://api.github.com/users/jniechcial/events{/privacy}","received_events_url":"https://api.github.com/users/jniechcial/received_events","type":"User","site_admin":false},"repo":{"id":39294851,"name":"react-select","full_name":"jniechcial/react-select","owner":{"login":"jniechcial","id":6025462,"avatar_url":"https://avatars.githubusercontent.com/u/6025462?v=3","gravatar_id":"","url":"https://api.github.com/users/jniechcial","html_url":"https://github.com/jniechcial","followers_url":"https://api.github.com/users/jniechcial/followers","following_url":"https://api.github.com/users/jniechcial/following{/other_user}","gists_url":"https://api.github.com/users/jniechcial/gists{/gist_id}","starred_url":"https://api.github.com/users/jniechcial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jniechcial/subscriptions","organizations_url":"https://api.github.com/users/jniechcial/orgs","repos_url":"https://api.github.com/users/jniechcial/repos","events_url":"https://api.github.com/users/jniechcial/events{/privacy}","received_events_url":"https://api.github.com/users/jniechcial/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jniechcial/react-select","description":"A Select control built with and for React JS","fork":true,"url":"https://api.github.com/repos/jniechcial/react-select","forks_url":"https://api.github.com/repos/jniechcial/react-select/forks","keys_url":"https://api.github.com/repos/jniechcial/react-select/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jniechcial/react-select/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jniechcial/react-select/teams","hooks_url":"https://api.github.com/repos/jniechcial/react-select/hooks","issue_events_url":"https://api.github.com/repos/jniechcial/react-select/issues/events{/number}","events_url":"https://api.github.com/repos/jniechcial/react-select/events","assignees_url":"https://api.github.com/repos/jniechcial/react-select/assignees{/user}","branches_url":"https://api.github.com/repos/jniechcial/react-select/branches{/branch}","tags_url":"https://api.github.com/repos/jniechcial/react-select/tags","blobs_url":"https://api.github.com/repos/jniechcial/react-select/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jniechcial/react-select/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jniechcial/react-select/git/refs{/sha}","trees_url":"https://api.github.com/repos/jniechcial/react-select/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jniechcial/react-select/statuses/{sha}","languages_url":"https://api.github.com/repos/jniechcial/react-select/languages","stargazers_url":"https://api.github.com/repos/jniechcial/react-select/stargazers","contributors_url":"https://api.github.com/repos/jniechcial/react-select/contributors","subscribers_url":"https://api.github.com/repos/jniechcial/react-select/subscribers","subscription_url":"https://api.github.com/repos/jniechcial/react-select/subscription","commits_url":"https://api.github.com/repos/jniechcial/react-select/commits{/sha}","git_commits_url":"https://api.github.com/repos/jniechcial/react-select/git/commits{/sha}","comments_url":"https://api.github.com/repos/jniechcial/react-select/comments{/number}","issue_comment_url":"https://api.github.com/repos/jniechcial/react-select/issues/comments{/number}","contents_url":"https://api.github.com/repos/jniechcial/react-select/contents/{+path}","compare_url":"https://api.github.com/repos/jniechcial/react-select/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jniechcial/react-select/merges","archive_url":"https://api.github.com/repos/jniechcial/react-select/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jniechcial/react-select/downloads","issues_url":"https://api.github.com/repos/jniechcial/react-select/issues{/number}","pulls_url":"https://api.github.com/repos/jniechcial/react-select/pulls{/number}","milestones_url":"https://api.github.com/repos/jniechcial/react-select/milestones{/number}","notifications_url":"https://api.github.com/repos/jniechcial/react-select/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jniechcial/react-select/labels{/name}","releases_url":"https://api.github.com/repos/jniechcial/react-select/releases{/id}","created_at":"2015-07-18T10:34:01Z","updated_at":"2015-07-18T10:34:02Z","pushed_at":"2015-08-02T15:50:44Z","git_url":"git://github.com/jniechcial/react-select.git","ssh_url":"git@github.com:jniechcial/react-select.git","clone_url":"https://github.com/jniechcial/react-select.git","svn_url":"https://github.com/jniechcial/react-select","homepage":null,"size":3494,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JedWatson:master","ref":"master","sha":"b82df378f430f0cb8a49b8b4b744c816c8d55abb","user":{"login":"JedWatson","id":872310,"avatar_url":"https://avatars.githubusercontent.com/u/872310?v=3","gravatar_id":"","url":"https://api.github.com/users/JedWatson","html_url":"https://github.com/JedWatson","followers_url":"https://api.github.com/users/JedWatson/followers","following_url":"https://api.github.com/users/JedWatson/following{/other_user}","gists_url":"https://api.github.com/users/JedWatson/gists{/gist_id}","starred_url":"https://api.github.com/users/JedWatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JedWatson/subscriptions","organizations_url":"https://api.github.com/users/JedWatson/orgs","repos_url":"https://api.github.com/users/JedWatson/repos","events_url":"https://api.github.com/users/JedWatson/events{/privacy}","received_events_url":"https://api.github.com/users/JedWatson/received_events","type":"User","site_admin":false},"repo":{"id":23338716,"name":"react-select","full_name":"JedWatson/react-select","owner":{"login":"JedWatson","id":872310,"avatar_url":"https://avatars.githubusercontent.com/u/872310?v=3","gravatar_id":"","url":"https://api.github.com/users/JedWatson","html_url":"https://github.com/JedWatson","followers_url":"https://api.github.com/users/JedWatson/followers","following_url":"https://api.github.com/users/JedWatson/following{/other_user}","gists_url":"https://api.github.com/users/JedWatson/gists{/gist_id}","starred_url":"https://api.github.com/users/JedWatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JedWatson/subscriptions","organizations_url":"https://api.github.com/users/JedWatson/orgs","repos_url":"https://api.github.com/users/JedWatson/repos","events_url":"https://api.github.com/users/JedWatson/events{/privacy}","received_events_url":"https://api.github.com/users/JedWatson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JedWatson/react-select","description":"A Select control built with and for React JS","fork":false,"url":"https://api.github.com/repos/JedWatson/react-select","forks_url":"https://api.github.com/repos/JedWatson/react-select/forks","keys_url":"https://api.github.com/repos/JedWatson/react-select/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JedWatson/react-select/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JedWatson/react-select/teams","hooks_url":"https://api.github.com/repos/JedWatson/react-select/hooks","issue_events_url":"https://api.github.com/repos/JedWatson/react-select/issues/events{/number}","events_url":"https://api.github.com/repos/JedWatson/react-select/events","assignees_url":"https://api.github.com/repos/JedWatson/react-select/assignees{/user}","branches_url":"https://api.github.com/repos/JedWatson/react-select/branches{/branch}","tags_url":"https://api.github.com/repos/JedWatson/react-select/tags","blobs_url":"https://api.github.com/repos/JedWatson/react-select/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JedWatson/react-select/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JedWatson/react-select/git/refs{/sha}","trees_url":"https://api.github.com/repos/JedWatson/react-select/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JedWatson/react-select/statuses/{sha}","languages_url":"https://api.github.com/repos/JedWatson/react-select/languages","stargazers_url":"https://api.github.com/repos/JedWatson/react-select/stargazers","contributors_url":"https://api.github.com/repos/JedWatson/react-select/contributors","subscribers_url":"https://api.github.com/repos/JedWatson/react-select/subscribers","subscription_url":"https://api.github.com/repos/JedWatson/react-select/subscription","commits_url":"https://api.github.com/repos/JedWatson/react-select/commits{/sha}","git_commits_url":"https://api.github.com/repos/JedWatson/react-select/git/commits{/sha}","comments_url":"https://api.github.com/repos/JedWatson/react-select/comments{/number}","issue_comment_url":"https://api.github.com/repos/JedWatson/react-select/issues/comments{/number}","contents_url":"https://api.github.com/repos/JedWatson/react-select/contents/{+path}","compare_url":"https://api.github.com/repos/JedWatson/react-select/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JedWatson/react-select/merges","archive_url":"https://api.github.com/repos/JedWatson/react-select/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JedWatson/react-select/downloads","issues_url":"https://api.github.com/repos/JedWatson/react-select/issues{/number}","pulls_url":"https://api.github.com/repos/JedWatson/react-select/pulls{/number}","milestones_url":"https://api.github.com/repos/JedWatson/react-select/milestones{/number}","notifications_url":"https://api.github.com/repos/JedWatson/react-select/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JedWatson/react-select/labels{/name}","releases_url":"https://api.github.com/repos/JedWatson/react-select/releases{/id}","created_at":"2014-08-26T04:27:45Z","updated_at":"2015-08-02T15:45:16Z","pushed_at":"2015-08-02T15:47:12Z","git_url":"git://github.com/JedWatson/react-select.git","ssh_url":"git@github.com:JedWatson/react-select.git","clone_url":"https://github.com/JedWatson/react-select.git","svn_url":"https://github.com/JedWatson/react-select","homepage":null,"size":6875,"stargazers_count":1014,"watchers_count":1014,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":275,"mirror_url":null,"open_issues_count":131,"forks":275,"open_issues":131,"watchers":1014,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JedWatson/react-select/pulls/328"},"html":{"href":"https://github.com/JedWatson/react-select/pull/328"},"issue":{"href":"https://api.github.com/repos/JedWatson/react-select/issues/328"},"comments":{"href":"https://api.github.com/repos/JedWatson/react-select/issues/328/comments"},"review_comments":{"href":"https://api.github.com/repos/JedWatson/react-select/pulls/328/comments"},"review_comment":{"href":"https://api.github.com/repos/JedWatson/react-select/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JedWatson/react-select/pulls/328/commits"},"statuses":{"href":"https://api.github.com/repos/JedWatson/react-select/statuses/8eacac4b77ab0f42cec1341d3810e40e67de3341"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":5,"review_comments":0,"commits":0,"additions":0,"deletions":0,"changed_files":0}}