{"action":"created","comment":{"url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/pulls/comments/140473348","pull_request_review_id":64553450,"id":140473348,"diff_hunk":"@@ -51,33 +53,39 @@ const styles = StyleSheet.create({\n   bottomPicker: {\n     width: SCREEN_WIDTH,\n   },\n-});\n+};\n \n const propTypes = {\n   buttonColor: PropTypes.string,\n   buttonStyle: PropTypes.object,\n-  options: PropTypes.array.isRequired,\n-  initialOptionIndex: PropTypes.number,\n-  labels: PropTypes.array,\n-  confirmText: PropTypes.string,\n   cancelText: PropTypes.string,\n+  confirmText: PropTypes.string,\n+  disableOverlay: PropTypes.bool,\n+  initialOptionIndex: PropTypes.number,\n   itemStyle: PropTypes.object,\n+  labels: PropTypes.array,\n+  modalVisible: PropTypes.bool,\n   onSubmit: PropTypes.func,\n-  disableOverlay: PropTypes.bool,\n+\toptions: PropTypes.array.isRequired,\n+\tstyles: PropTypes.object,\n };\n \n class SimplePicker extends Component {\n-  constructor(props) {\n+\tstatic defaultProps = {\n+\t\tstyles: {}\n+\t};\n+\tconstructor(props) {\n     super(props);\n \n-    const selected = this.props.initialOptionIndex || 0;\n+    const selected = props.initialOptionIndex || 0;\n \n     this.state = {\n-      modalVisible: false,\n-      selectedOption: this.props.options[selected],\n+      modalVisible: props.modalVisible || false,\n+      selectedOption: props.options[selected],\n     };\n+\t\tthis.styles = StyleSheet.create({...styles, ...props.styles});\n \n-    this.onPressCancel = this.onPressCancel.bind(this);\n+\t\tthis.onPressCancel = this.onPressCancel.bind(this);","path":"index.js","position":77,"original_position":77,"commit_id":"54e8b6c2ffb93b94ca3bcd8f65cf02a205d39989","original_commit_id":"54e8b6c2ffb93b94ca3bcd8f65cf02a205d39989","user":{"login":"syzer","id":1989646,"avatar_url":"https://avatars2.githubusercontent.com/u/1989646?v=4","gravatar_id":"","url":"https://api.github.com/users/syzer","html_url":"https://github.com/syzer","followers_url":"https://api.github.com/users/syzer/followers","following_url":"https://api.github.com/users/syzer/following{/other_user}","gists_url":"https://api.github.com/users/syzer/gists{/gist_id}","starred_url":"https://api.github.com/users/syzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syzer/subscriptions","organizations_url":"https://api.github.com/users/syzer/orgs","repos_url":"https://api.github.com/users/syzer/repos","events_url":"https://api.github.com/users/syzer/events{/privacy}","received_events_url":"https://api.github.com/users/syzer/received_events","type":"User","site_admin":false},"body":"also compoanentWillRecieveProps() needs to be updated","created_at":"2017-09-22T11:44:42Z","updated_at":"2017-09-22T11:44:42Z","html_url":"https://github.com/puredazzle/react-native-simple-picker/pull/24#discussion_r140473348","pull_request_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/pulls/24","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/puredazzle/react-native-simple-picker/pulls/comments/140473348"},"html":{"href":"https://github.com/puredazzle/react-native-simple-picker/pull/24#discussion_r140473348"},"pull_request":{"href":"https://api.github.com/repos/puredazzle/react-native-simple-picker/pulls/24"}},"in_reply_to_id":140454999},"pull_request":{"url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/pulls/24","id":142133987,"html_url":"https://github.com/puredazzle/react-native-simple-picker/pull/24","diff_url":"https://github.com/puredazzle/react-native-simple-picker/pull/24.diff","patch_url":"https://github.com/puredazzle/react-native-simple-picker/pull/24.patch","issue_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/issues/24","number":24,"state":"open","locked":false,"title":"Use Android friendly libraries. ","user":{"login":"syzer","id":1989646,"avatar_url":"https://avatars2.githubusercontent.com/u/1989646?v=4","gravatar_id":"","url":"https://api.github.com/users/syzer","html_url":"https://github.com/syzer","followers_url":"https://api.github.com/users/syzer/followers","following_url":"https://api.github.com/users/syzer/following{/other_user}","gists_url":"https://api.github.com/users/syzer/gists{/gist_id}","starred_url":"https://api.github.com/users/syzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syzer/subscriptions","organizations_url":"https://api.github.com/users/syzer/orgs","repos_url":"https://api.github.com/users/syzer/repos","events_url":"https://api.github.com/users/syzer/events{/privacy}","received_events_url":"https://api.github.com/users/syzer/received_events","type":"User","site_admin":false},"body":"Added ability to control initial state of picker, without using `ref` , which can be useful when one uses react stateless components (as they do not have `ref`)","created_at":"2017-09-20T15:39:27Z","updated_at":"2017-09-22T11:44:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bdc1eb43d297b1c8462dbb4f876165f4c8c6ffa6","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/pulls/24/commits","review_comments_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/pulls/24/comments","review_comment_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/issues/24/comments","statuses_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/statuses/54e8b6c2ffb93b94ca3bcd8f65cf02a205d39989","head":{"label":"syzer:master","ref":"master","sha":"54e8b6c2ffb93b94ca3bcd8f65cf02a205d39989","user":{"login":"syzer","id":1989646,"avatar_url":"https://avatars2.githubusercontent.com/u/1989646?v=4","gravatar_id":"","url":"https://api.github.com/users/syzer","html_url":"https://github.com/syzer","followers_url":"https://api.github.com/users/syzer/followers","following_url":"https://api.github.com/users/syzer/following{/other_user}","gists_url":"https://api.github.com/users/syzer/gists{/gist_id}","starred_url":"https://api.github.com/users/syzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syzer/subscriptions","organizations_url":"https://api.github.com/users/syzer/orgs","repos_url":"https://api.github.com/users/syzer/repos","events_url":"https://api.github.com/users/syzer/events{/privacy}","received_events_url":"https://api.github.com/users/syzer/received_events","type":"User","site_admin":false},"repo":{"id":103987123,"name":"react-native-simple-picker","full_name":"syzer/react-native-simple-picker","owner":{"login":"syzer","id":1989646,"avatar_url":"https://avatars2.githubusercontent.com/u/1989646?v=4","gravatar_id":"","url":"https://api.github.com/users/syzer","html_url":"https://github.com/syzer","followers_url":"https://api.github.com/users/syzer/followers","following_url":"https://api.github.com/users/syzer/following{/other_user}","gists_url":"https://api.github.com/users/syzer/gists{/gist_id}","starred_url":"https://api.github.com/users/syzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syzer/subscriptions","organizations_url":"https://api.github.com/users/syzer/orgs","repos_url":"https://api.github.com/users/syzer/repos","events_url":"https://api.github.com/users/syzer/events{/privacy}","received_events_url":"https://api.github.com/users/syzer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/syzer/react-native-simple-picker","description":"A simple iOS picker for React Native.","fork":true,"url":"https://api.github.com/repos/syzer/react-native-simple-picker","forks_url":"https://api.github.com/repos/syzer/react-native-simple-picker/forks","keys_url":"https://api.github.com/repos/syzer/react-native-simple-picker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/syzer/react-native-simple-picker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/syzer/react-native-simple-picker/teams","hooks_url":"https://api.github.com/repos/syzer/react-native-simple-picker/hooks","issue_events_url":"https://api.github.com/repos/syzer/react-native-simple-picker/issues/events{/number}","events_url":"https://api.github.com/repos/syzer/react-native-simple-picker/events","assignees_url":"https://api.github.com/repos/syzer/react-native-simple-picker/assignees{/user}","branches_url":"https://api.github.com/repos/syzer/react-native-simple-picker/branches{/branch}","tags_url":"https://api.github.com/repos/syzer/react-native-simple-picker/tags","blobs_url":"https://api.github.com/repos/syzer/react-native-simple-picker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/syzer/react-native-simple-picker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/syzer/react-native-simple-picker/git/refs{/sha}","trees_url":"https://api.github.com/repos/syzer/react-native-simple-picker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/syzer/react-native-simple-picker/statuses/{sha}","languages_url":"https://api.github.com/repos/syzer/react-native-simple-picker/languages","stargazers_url":"https://api.github.com/repos/syzer/react-native-simple-picker/stargazers","contributors_url":"https://api.github.com/repos/syzer/react-native-simple-picker/contributors","subscribers_url":"https://api.github.com/repos/syzer/react-native-simple-picker/subscribers","subscription_url":"https://api.github.com/repos/syzer/react-native-simple-picker/subscription","commits_url":"https://api.github.com/repos/syzer/react-native-simple-picker/commits{/sha}","git_commits_url":"https://api.github.com/repos/syzer/react-native-simple-picker/git/commits{/sha}","comments_url":"https://api.github.com/repos/syzer/react-native-simple-picker/comments{/number}","issue_comment_url":"https://api.github.com/repos/syzer/react-native-simple-picker/issues/comments{/number}","contents_url":"https://api.github.com/repos/syzer/react-native-simple-picker/contents/{+path}","compare_url":"https://api.github.com/repos/syzer/react-native-simple-picker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/syzer/react-native-simple-picker/merges","archive_url":"https://api.github.com/repos/syzer/react-native-simple-picker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/syzer/react-native-simple-picker/downloads","issues_url":"https://api.github.com/repos/syzer/react-native-simple-picker/issues{/number}","pulls_url":"https://api.github.com/repos/syzer/react-native-simple-picker/pulls{/number}","milestones_url":"https://api.github.com/repos/syzer/react-native-simple-picker/milestones{/number}","notifications_url":"https://api.github.com/repos/syzer/react-native-simple-picker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/syzer/react-native-simple-picker/labels{/name}","releases_url":"https://api.github.com/repos/syzer/react-native-simple-picker/releases{/id}","deployments_url":"https://api.github.com/repos/syzer/react-native-simple-picker/deployments","created_at":"2017-09-18T20:13:18Z","updated_at":"2017-09-20T15:26:47Z","pushed_at":"2017-09-21T14:05:19Z","git_url":"git://github.com/syzer/react-native-simple-picker.git","ssh_url":"git@github.com:syzer/react-native-simple-picker.git","clone_url":"https://github.com/syzer/react-native-simple-picker.git","svn_url":"https://github.com/syzer/react-native-simple-picker","homepage":"https://www.npmjs.com/package/react-native-simple-picker","size":167,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"puredazzle:master","ref":"master","sha":"a73236a8f8f0a3358e7bb69c5dbc962a81e034d8","user":{"login":"puredazzle","id":3775209,"avatar_url":"https://avatars2.githubusercontent.com/u/3775209?v=4","gravatar_id":"","url":"https://api.github.com/users/puredazzle","html_url":"https://github.com/puredazzle","followers_url":"https://api.github.com/users/puredazzle/followers","following_url":"https://api.github.com/users/puredazzle/following{/other_user}","gists_url":"https://api.github.com/users/puredazzle/gists{/gist_id}","starred_url":"https://api.github.com/users/puredazzle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puredazzle/subscriptions","organizations_url":"https://api.github.com/users/puredazzle/orgs","repos_url":"https://api.github.com/users/puredazzle/repos","events_url":"https://api.github.com/users/puredazzle/events{/privacy}","received_events_url":"https://api.github.com/users/puredazzle/received_events","type":"User","site_admin":false},"repo":{"id":55588546,"name":"react-native-simple-picker","full_name":"puredazzle/react-native-simple-picker","owner":{"login":"puredazzle","id":3775209,"avatar_url":"https://avatars2.githubusercontent.com/u/3775209?v=4","gravatar_id":"","url":"https://api.github.com/users/puredazzle","html_url":"https://github.com/puredazzle","followers_url":"https://api.github.com/users/puredazzle/followers","following_url":"https://api.github.com/users/puredazzle/following{/other_user}","gists_url":"https://api.github.com/users/puredazzle/gists{/gist_id}","starred_url":"https://api.github.com/users/puredazzle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puredazzle/subscriptions","organizations_url":"https://api.github.com/users/puredazzle/orgs","repos_url":"https://api.github.com/users/puredazzle/repos","events_url":"https://api.github.com/users/puredazzle/events{/privacy}","received_events_url":"https://api.github.com/users/puredazzle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/puredazzle/react-native-simple-picker","description":"A simple iOS picker for React Native.","fork":false,"url":"https://api.github.com/repos/puredazzle/react-native-simple-picker","forks_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/forks","keys_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/teams","hooks_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/hooks","issue_events_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/issues/events{/number}","events_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/events","assignees_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/assignees{/user}","branches_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/branches{/branch}","tags_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/tags","blobs_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/git/refs{/sha}","trees_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/statuses/{sha}","languages_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/languages","stargazers_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/stargazers","contributors_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/contributors","subscribers_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/subscribers","subscription_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/subscription","commits_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/commits{/sha}","git_commits_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/git/commits{/sha}","comments_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/comments{/number}","issue_comment_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/issues/comments{/number}","contents_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/contents/{+path}","compare_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/merges","archive_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/downloads","issues_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/issues{/number}","pulls_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/pulls{/number}","milestones_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/milestones{/number}","notifications_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/labels{/name}","releases_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/releases{/id}","deployments_url":"https://api.github.com/repos/puredazzle/react-native-simple-picker/deployments","created_at":"2016-04-06T08:26:05Z","updated_at":"2017-09-19T02:55:18Z","pushed_at":"2017-09-21T14:05:21Z","git_url":"git://github.com/puredazzle/react-native-simple-picker.git","ssh_url":"git@github.com:puredazzle/react-native-simple-picker.git","clone_url":"https://github.com/puredazzle/react-native-simple-picker.git","svn_url":"https://github.com/puredazzle/react-native-simple-picker","homepage":"https://www.npmjs.com/package/react-native-simple-picker","size":164,"stargazers_count":31,"watchers_count":31,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":2,"forks":22,"open_issues":2,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puredazzle/react-native-simple-picker/pulls/24"},"html":{"href":"https://github.com/puredazzle/react-native-simple-picker/pull/24"},"issue":{"href":"https://api.github.com/repos/puredazzle/react-native-simple-picker/issues/24"},"comments":{"href":"https://api.github.com/repos/puredazzle/react-native-simple-picker/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/puredazzle/react-native-simple-picker/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/puredazzle/react-native-simple-picker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puredazzle/react-native-simple-picker/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/puredazzle/react-native-simple-picker/statuses/54e8b6c2ffb93b94ca3bcd8f65cf02a205d39989"}},"author_association":"NONE"}}
{"actor":{"display_login":"syzer"}}