{"action":"created","comment":{"url":"https://api.github.com/repos/CanopyTax/cpr-select/pulls/comments/172925620","pull_request_review_id":102027150,"id":172925620,"diff_hunk":"@@ -241,18 +241,18 @@ export default class CanopySelect extends React.Component {\n \t\t];\n \t\tlet that = this;\n \n-\t\tif (this.props.disabled) cpSelectClasses += ' +disabled';\n+\t\tif (this.props.disabled || this.props.options.length === 0) cpSelectClasses += ' +disabled';\n \t\tif (this.state.focused && !this.props.disabled) cpSelectClasses += ' +focus';\n \n \t\treturn (\n \t\t\t<div ref={function(el) { if (el) that.el = el; }} className={`cp-select-outer ${this.props.outerClass ? this.props.outerClass : ''}`} role='select'>\n-\t\t\t\t<input className=\"cp-select__hidden-input\" onFocus={this.focusSelect} onBlur={this.onBlur} onKeyDown={this.onKeyDown}/>\n+\t\t\t\t<input className=\" cp-select__hidden-input\" onFocus={this.focusSelect} onBlur={this.onBlur} onKeyDown={this.onKeyDown}/>\n \t\t\t\t<div className={`${cpSelectClasses} ${this.props.selectClass}`} onClick={this.displayDialog}>\n \t\t\t\t\t{selectedItem\n \t\t\t\t\t\t? <div className=\"cp-select__selected\">{selectedItem.value}</div>\n \t\t\t\t\t\t: <div className=\"cp-select__selected\" style={{color:'#afafaf'}}>{this.props.placeholder}</div>\n \t\t\t\t\t}\n-\t\t\t\t\t<div className=\"cp-select__icon\"></div>\n+\t\t\t\t\t{this.props.options.length > 0 ? <div className=\"cp-select__icon\"></div>: null}","path":"src/select.js","position":18,"original_position":18,"commit_id":"953661ccf98a76e379f3562ef0e1c3d5c19a2d9b","original_commit_id":"953661ccf98a76e379f3562ef0e1c3d5c19a2d9b","user":{"login":"neiloler","id":5375618,"avatar_url":"https://avatars1.githubusercontent.com/u/5375618?v=4","gravatar_id":"","url":"https://api.github.com/users/neiloler","html_url":"https://github.com/neiloler","followers_url":"https://api.github.com/users/neiloler/followers","following_url":"https://api.github.com/users/neiloler/following{/other_user}","gists_url":"https://api.github.com/users/neiloler/gists{/gist_id}","starred_url":"https://api.github.com/users/neiloler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neiloler/subscriptions","organizations_url":"https://api.github.com/users/neiloler/orgs","repos_url":"https://api.github.com/users/neiloler/repos","events_url":"https://api.github.com/users/neiloler/events{/privacy}","received_events_url":"https://api.github.com/users/neiloler/received_events","type":"User","site_admin":false},"body":"You could also do `this.props.options.length > 0 && <div>...`, no need for the ternary. ","created_at":"2018-03-07T17:43:09Z","updated_at":"2018-03-07T17:43:20Z","html_url":"https://github.com/CanopyTax/cpr-select/pull/125#discussion_r172925620","pull_request_url":"https://api.github.com/repos/CanopyTax/cpr-select/pulls/125","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/CanopyTax/cpr-select/pulls/comments/172925620"},"html":{"href":"https://github.com/CanopyTax/cpr-select/pull/125#discussion_r172925620"},"pull_request":{"href":"https://api.github.com/repos/CanopyTax/cpr-select/pulls/125"}}},"pull_request":{"url":"https://api.github.com/repos/CanopyTax/cpr-select/pulls/125","id":173523470,"html_url":"https://github.com/CanopyTax/cpr-select/pull/125","diff_url":"https://github.com/CanopyTax/cpr-select/pull/125.diff","patch_url":"https://github.com/CanopyTax/cpr-select/pull/125.patch","issue_url":"https://api.github.com/repos/CanopyTax/cpr-select/issues/125","number":125,"state":"open","locked":false,"title":"Disable if there are no options, also don't show the dropdown arrow i…","user":{"login":"greenjeffreym","id":13857982,"avatar_url":"https://avatars2.githubusercontent.com/u/13857982?v=4","gravatar_id":"","url":"https://api.github.com/users/greenjeffreym","html_url":"https://github.com/greenjeffreym","followers_url":"https://api.github.com/users/greenjeffreym/followers","following_url":"https://api.github.com/users/greenjeffreym/following{/other_user}","gists_url":"https://api.github.com/users/greenjeffreym/gists{/gist_id}","starred_url":"https://api.github.com/users/greenjeffreym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenjeffreym/subscriptions","organizations_url":"https://api.github.com/users/greenjeffreym/orgs","repos_url":"https://api.github.com/users/greenjeffreym/repos","events_url":"https://api.github.com/users/greenjeffreym/events{/privacy}","received_events_url":"https://api.github.com/users/greenjeffreym/received_events","type":"User","site_admin":false},"body":"…f there are no options.","created_at":"2018-03-07T17:37:09Z","updated_at":"2018-03-07T17:43:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8eb968f158dbc201f2fb1e8a3773331bcfa0da1f","assignee":{"login":"kentmclean","id":10731712,"avatar_url":"https://avatars2.githubusercontent.com/u/10731712?v=4","gravatar_id":"","url":"https://api.github.com/users/kentmclean","html_url":"https://github.com/kentmclean","followers_url":"https://api.github.com/users/kentmclean/followers","following_url":"https://api.github.com/users/kentmclean/following{/other_user}","gists_url":"https://api.github.com/users/kentmclean/gists{/gist_id}","starred_url":"https://api.github.com/users/kentmclean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentmclean/subscriptions","organizations_url":"https://api.github.com/users/kentmclean/orgs","repos_url":"https://api.github.com/users/kentmclean/repos","events_url":"https://api.github.com/users/kentmclean/events{/privacy}","received_events_url":"https://api.github.com/users/kentmclean/received_events","type":"User","site_admin":false},"assignees":[{"login":"kentmclean","id":10731712,"avatar_url":"https://avatars2.githubusercontent.com/u/10731712?v=4","gravatar_id":"","url":"https://api.github.com/users/kentmclean","html_url":"https://github.com/kentmclean","followers_url":"https://api.github.com/users/kentmclean/followers","following_url":"https://api.github.com/users/kentmclean/following{/other_user}","gists_url":"https://api.github.com/users/kentmclean/gists{/gist_id}","starred_url":"https://api.github.com/users/kentmclean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentmclean/subscriptions","organizations_url":"https://api.github.com/users/kentmclean/orgs","repos_url":"https://api.github.com/users/kentmclean/repos","events_url":"https://api.github.com/users/kentmclean/events{/privacy}","received_events_url":"https://api.github.com/users/kentmclean/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CanopyTax/cpr-select/pulls/125/commits","review_comments_url":"https://api.github.com/repos/CanopyTax/cpr-select/pulls/125/comments","review_comment_url":"https://api.github.com/repos/CanopyTax/cpr-select/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CanopyTax/cpr-select/issues/125/comments","statuses_url":"https://api.github.com/repos/CanopyTax/cpr-select/statuses/953661ccf98a76e379f3562ef0e1c3d5c19a2d9b","head":{"label":"CanopyTax:Empty-Options","ref":"Empty-Options","sha":"953661ccf98a76e379f3562ef0e1c3d5c19a2d9b","user":{"login":"CanopyTax","id":8931373,"avatar_url":"https://avatars2.githubusercontent.com/u/8931373?v=4","gravatar_id":"","url":"https://api.github.com/users/CanopyTax","html_url":"https://github.com/CanopyTax","followers_url":"https://api.github.com/users/CanopyTax/followers","following_url":"https://api.github.com/users/CanopyTax/following{/other_user}","gists_url":"https://api.github.com/users/CanopyTax/gists{/gist_id}","starred_url":"https://api.github.com/users/CanopyTax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanopyTax/subscriptions","organizations_url":"https://api.github.com/users/CanopyTax/orgs","repos_url":"https://api.github.com/users/CanopyTax/repos","events_url":"https://api.github.com/users/CanopyTax/events{/privacy}","received_events_url":"https://api.github.com/users/CanopyTax/received_events","type":"Organization","site_admin":false},"repo":{"id":38782074,"name":"cpr-select","full_name":"CanopyTax/cpr-select","owner":{"login":"CanopyTax","id":8931373,"avatar_url":"https://avatars2.githubusercontent.com/u/8931373?v=4","gravatar_id":"","url":"https://api.github.com/users/CanopyTax","html_url":"https://github.com/CanopyTax","followers_url":"https://api.github.com/users/CanopyTax/followers","following_url":"https://api.github.com/users/CanopyTax/following{/other_user}","gists_url":"https://api.github.com/users/CanopyTax/gists{/gist_id}","starred_url":"https://api.github.com/users/CanopyTax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanopyTax/subscriptions","organizations_url":"https://api.github.com/users/CanopyTax/orgs","repos_url":"https://api.github.com/users/CanopyTax/repos","events_url":"https://api.github.com/users/CanopyTax/events{/privacy}","received_events_url":"https://api.github.com/users/CanopyTax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CanopyTax/cpr-select","description":"A consistently styled cross-browser and keyboard friendly select component","fork":false,"url":"https://api.github.com/repos/CanopyTax/cpr-select","forks_url":"https://api.github.com/repos/CanopyTax/cpr-select/forks","keys_url":"https://api.github.com/repos/CanopyTax/cpr-select/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CanopyTax/cpr-select/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CanopyTax/cpr-select/teams","hooks_url":"https://api.github.com/repos/CanopyTax/cpr-select/hooks","issue_events_url":"https://api.github.com/repos/CanopyTax/cpr-select/issues/events{/number}","events_url":"https://api.github.com/repos/CanopyTax/cpr-select/events","assignees_url":"https://api.github.com/repos/CanopyTax/cpr-select/assignees{/user}","branches_url":"https://api.github.com/repos/CanopyTax/cpr-select/branches{/branch}","tags_url":"https://api.github.com/repos/CanopyTax/cpr-select/tags","blobs_url":"https://api.github.com/repos/CanopyTax/cpr-select/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CanopyTax/cpr-select/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CanopyTax/cpr-select/git/refs{/sha}","trees_url":"https://api.github.com/repos/CanopyTax/cpr-select/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CanopyTax/cpr-select/statuses/{sha}","languages_url":"https://api.github.com/repos/CanopyTax/cpr-select/languages","stargazers_url":"https://api.github.com/repos/CanopyTax/cpr-select/stargazers","contributors_url":"https://api.github.com/repos/CanopyTax/cpr-select/contributors","subscribers_url":"https://api.github.com/repos/CanopyTax/cpr-select/subscribers","subscription_url":"https://api.github.com/repos/CanopyTax/cpr-select/subscription","commits_url":"https://api.github.com/repos/CanopyTax/cpr-select/commits{/sha}","git_commits_url":"https://api.github.com/repos/CanopyTax/cpr-select/git/commits{/sha}","comments_url":"https://api.github.com/repos/CanopyTax/cpr-select/comments{/number}","issue_comment_url":"https://api.github.com/repos/CanopyTax/cpr-select/issues/comments{/number}","contents_url":"https://api.github.com/repos/CanopyTax/cpr-select/contents/{+path}","compare_url":"https://api.github.com/repos/CanopyTax/cpr-select/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CanopyTax/cpr-select/merges","archive_url":"https://api.github.com/repos/CanopyTax/cpr-select/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CanopyTax/cpr-select/downloads","issues_url":"https://api.github.com/repos/CanopyTax/cpr-select/issues{/number}","pulls_url":"https://api.github.com/repos/CanopyTax/cpr-select/pulls{/number}","milestones_url":"https://api.github.com/repos/CanopyTax/cpr-select/milestones{/number}","notifications_url":"https://api.github.com/repos/CanopyTax/cpr-select/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CanopyTax/cpr-select/labels{/name}","releases_url":"https://api.github.com/repos/CanopyTax/cpr-select/releases{/id}","deployments_url":"https://api.github.com/repos/CanopyTax/cpr-select/deployments","created_at":"2015-07-08T21:54:29Z","updated_at":"2017-11-10T02:20:52Z","pushed_at":"2018-03-07T17:37:10Z","git_url":"git://github.com/CanopyTax/cpr-select.git","ssh_url":"git@github.com:CanopyTax/cpr-select.git","clone_url":"https://github.com/CanopyTax/cpr-select.git","svn_url":"https://github.com/CanopyTax/cpr-select","homepage":null,"size":260,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":3,"watchers":5,"default_branch":"master"}},"base":{"label":"CanopyTax:master","ref":"master","sha":"cbb8846780c093e85204629ac33f9bb4fc9db256","user":{"login":"CanopyTax","id":8931373,"avatar_url":"https://avatars2.githubusercontent.com/u/8931373?v=4","gravatar_id":"","url":"https://api.github.com/users/CanopyTax","html_url":"https://github.com/CanopyTax","followers_url":"https://api.github.com/users/CanopyTax/followers","following_url":"https://api.github.com/users/CanopyTax/following{/other_user}","gists_url":"https://api.github.com/users/CanopyTax/gists{/gist_id}","starred_url":"https://api.github.com/users/CanopyTax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanopyTax/subscriptions","organizations_url":"https://api.github.com/users/CanopyTax/orgs","repos_url":"https://api.github.com/users/CanopyTax/repos","events_url":"https://api.github.com/users/CanopyTax/events{/privacy}","received_events_url":"https://api.github.com/users/CanopyTax/received_events","type":"Organization","site_admin":false},"repo":{"id":38782074,"name":"cpr-select","full_name":"CanopyTax/cpr-select","owner":{"login":"CanopyTax","id":8931373,"avatar_url":"https://avatars2.githubusercontent.com/u/8931373?v=4","gravatar_id":"","url":"https://api.github.com/users/CanopyTax","html_url":"https://github.com/CanopyTax","followers_url":"https://api.github.com/users/CanopyTax/followers","following_url":"https://api.github.com/users/CanopyTax/following{/other_user}","gists_url":"https://api.github.com/users/CanopyTax/gists{/gist_id}","starred_url":"https://api.github.com/users/CanopyTax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanopyTax/subscriptions","organizations_url":"https://api.github.com/users/CanopyTax/orgs","repos_url":"https://api.github.com/users/CanopyTax/repos","events_url":"https://api.github.com/users/CanopyTax/events{/privacy}","received_events_url":"https://api.github.com/users/CanopyTax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CanopyTax/cpr-select","description":"A consistently styled cross-browser and keyboard friendly select component","fork":false,"url":"https://api.github.com/repos/CanopyTax/cpr-select","forks_url":"https://api.github.com/repos/CanopyTax/cpr-select/forks","keys_url":"https://api.github.com/repos/CanopyTax/cpr-select/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CanopyTax/cpr-select/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CanopyTax/cpr-select/teams","hooks_url":"https://api.github.com/repos/CanopyTax/cpr-select/hooks","issue_events_url":"https://api.github.com/repos/CanopyTax/cpr-select/issues/events{/number}","events_url":"https://api.github.com/repos/CanopyTax/cpr-select/events","assignees_url":"https://api.github.com/repos/CanopyTax/cpr-select/assignees{/user}","branches_url":"https://api.github.com/repos/CanopyTax/cpr-select/branches{/branch}","tags_url":"https://api.github.com/repos/CanopyTax/cpr-select/tags","blobs_url":"https://api.github.com/repos/CanopyTax/cpr-select/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CanopyTax/cpr-select/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CanopyTax/cpr-select/git/refs{/sha}","trees_url":"https://api.github.com/repos/CanopyTax/cpr-select/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CanopyTax/cpr-select/statuses/{sha}","languages_url":"https://api.github.com/repos/CanopyTax/cpr-select/languages","stargazers_url":"https://api.github.com/repos/CanopyTax/cpr-select/stargazers","contributors_url":"https://api.github.com/repos/CanopyTax/cpr-select/contributors","subscribers_url":"https://api.github.com/repos/CanopyTax/cpr-select/subscribers","subscription_url":"https://api.github.com/repos/CanopyTax/cpr-select/subscription","commits_url":"https://api.github.com/repos/CanopyTax/cpr-select/commits{/sha}","git_commits_url":"https://api.github.com/repos/CanopyTax/cpr-select/git/commits{/sha}","comments_url":"https://api.github.com/repos/CanopyTax/cpr-select/comments{/number}","issue_comment_url":"https://api.github.com/repos/CanopyTax/cpr-select/issues/comments{/number}","contents_url":"https://api.github.com/repos/CanopyTax/cpr-select/contents/{+path}","compare_url":"https://api.github.com/repos/CanopyTax/cpr-select/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CanopyTax/cpr-select/merges","archive_url":"https://api.github.com/repos/CanopyTax/cpr-select/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CanopyTax/cpr-select/downloads","issues_url":"https://api.github.com/repos/CanopyTax/cpr-select/issues{/number}","pulls_url":"https://api.github.com/repos/CanopyTax/cpr-select/pulls{/number}","milestones_url":"https://api.github.com/repos/CanopyTax/cpr-select/milestones{/number}","notifications_url":"https://api.github.com/repos/CanopyTax/cpr-select/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CanopyTax/cpr-select/labels{/name}","releases_url":"https://api.github.com/repos/CanopyTax/cpr-select/releases{/id}","deployments_url":"https://api.github.com/repos/CanopyTax/cpr-select/deployments","created_at":"2015-07-08T21:54:29Z","updated_at":"2017-11-10T02:20:52Z","pushed_at":"2018-03-07T17:37:10Z","git_url":"git://github.com/CanopyTax/cpr-select.git","ssh_url":"git@github.com:CanopyTax/cpr-select.git","clone_url":"https://github.com/CanopyTax/cpr-select.git","svn_url":"https://github.com/CanopyTax/cpr-select","homepage":null,"size":260,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":3,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CanopyTax/cpr-select/pulls/125"},"html":{"href":"https://github.com/CanopyTax/cpr-select/pull/125"},"issue":{"href":"https://api.github.com/repos/CanopyTax/cpr-select/issues/125"},"comments":{"href":"https://api.github.com/repos/CanopyTax/cpr-select/issues/125/comments"},"review_comments":{"href":"https://api.github.com/repos/CanopyTax/cpr-select/pulls/125/comments"},"review_comment":{"href":"https://api.github.com/repos/CanopyTax/cpr-select/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CanopyTax/cpr-select/pulls/125/commits"},"statuses":{"href":"https://api.github.com/repos/CanopyTax/cpr-select/statuses/953661ccf98a76e379f3562ef0e1c3d5c19a2d9b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"neiloler"}}