{"action":"created","comment":{"url":"https://api.github.com/repos/namely/styleguide/pulls/comments/43675251","id":43675251,"diff_hunk":"@@ -0,0 +1,79 @@\n+import FieldErrors from '../../field-errors';\n+import React from 'react';\n+import SimpleSelect from './simple-select';\n+\n+const Type = React.PropTypes;\n+\n+export default React.createClass({\n+\n+  displayName: \"SelectField\",\n+\n+  propTypes: {\n+    disabled: Type.bool,\n+    errors: Type.array,\n+    extraClasses: Type.array,\n+    fieldColor: Type.oneOf(['light', 'dark']),\n+    includeBlank: Type.oneOfType([Type.bool, Type.string]),\n+    label: Type.string,\n+    name: Type.string,\n+    onChange: Type.func,\n+    options: Type.oneOfType([Type.object, Type.array]).isRequired,\n+    placeholder: Type.string,\n+    value: Type.oneOfType([Type.object, Type.string, Type.number])\n+  },\n+\n+  getDefaultProps() {\n+    return {\n+      disabled: false,\n+      errors: [],\n+      fieldColor: 'light',\n+      onChange: function() {}\n+    }\n+  },\n+\n+  getInitialState() {\n+    return {\n+      disabled: this.props.disabled || false,\n+      errors: this.props.errors || [],\n+    };\n+  },\n+\n+  containerClasses() {\n+    let classes = ['relative'];\n+    classes.push(this.props.extraClasses);\n+    return classes.join(' ');\n+  },\n+\n+  handleChange(e) {\n+    this.props.onChange();\n+    this.resetErrors();\n+  },\n+\n+  label() {\n+    if (this.props.label) {\n+      return <label className=\"px2 mb1 relative\">","path":"src/js/components/forms/fields/select/select-field.js","position":54,"original_position":54,"commit_id":"09366c228c12eb8bef4e73e85039c23e12835245","original_commit_id":"09366c228c12eb8bef4e73e85039c23e12835245","user":{"login":"HipsterBrown","id":3051193,"avatar_url":"https://avatars.githubusercontent.com/u/3051193?v=3","gravatar_id":"","url":"https://api.github.com/users/HipsterBrown","html_url":"https://github.com/HipsterBrown","followers_url":"https://api.github.com/users/HipsterBrown/followers","following_url":"https://api.github.com/users/HipsterBrown/following{/other_user}","gists_url":"https://api.github.com/users/HipsterBrown/gists{/gist_id}","starred_url":"https://api.github.com/users/HipsterBrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HipsterBrown/subscriptions","organizations_url":"https://api.github.com/users/HipsterBrown/orgs","repos_url":"https://api.github.com/users/HipsterBrown/repos","events_url":"https://api.github.com/users/HipsterBrown/events{/privacy}","received_events_url":"https://api.github.com/users/HipsterBrown/received_events","type":"User","site_admin":false},"body":"Instead:\r\n\r\n```js\r\nreturn (\r\n   <label></label>\r\n)\r\n```","created_at":"2015-11-02T20:10:35Z","updated_at":"2015-11-02T20:10:35Z","html_url":"https://github.com/namely/styleguide/pull/191#discussion_r43675251","pull_request_url":"https://api.github.com/repos/namely/styleguide/pulls/191","_links":{"self":{"href":"https://api.github.com/repos/namely/styleguide/pulls/comments/43675251"},"html":{"href":"https://github.com/namely/styleguide/pull/191#discussion_r43675251"},"pull_request":{"href":"https://api.github.com/repos/namely/styleguide/pulls/191"}}},"pull_request":{"url":"https://api.github.com/repos/namely/styleguide/pulls/191","id":48605161,"html_url":"https://github.com/namely/styleguide/pull/191","diff_url":"https://github.com/namely/styleguide/pull/191.diff","patch_url":"https://github.com/namely/styleguide/pull/191.patch","issue_url":"https://api.github.com/repos/namely/styleguide/issues/191","number":191,"state":"open","locked":false,"title":"Select Field","user":{"login":"jasonfellows","id":1119770,"avatar_url":"https://avatars.githubusercontent.com/u/1119770?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonfellows","html_url":"https://github.com/jasonfellows","followers_url":"https://api.github.com/users/jasonfellows/followers","following_url":"https://api.github.com/users/jasonfellows/following{/other_user}","gists_url":"https://api.github.com/users/jasonfellows/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonfellows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonfellows/subscriptions","organizations_url":"https://api.github.com/users/jasonfellows/orgs","repos_url":"https://api.github.com/users/jasonfellows/repos","events_url":"https://api.github.com/users/jasonfellows/events{/privacy}","received_events_url":"https://api.github.com/users/jasonfellows/received_events","type":"User","site_admin":false},"body":"Add a wrapper component for Simple Select.","created_at":"2015-10-23T17:08:22Z","updated_at":"2015-11-02T20:10:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d45c36096a2709381e0d23a4b8f37e6bdd180b7b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/namely/styleguide/pulls/191/commits","review_comments_url":"https://api.github.com/repos/namely/styleguide/pulls/191/comments","review_comment_url":"https://api.github.com/repos/namely/styleguide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/namely/styleguide/issues/191/comments","statuses_url":"https://api.github.com/repos/namely/styleguide/statuses/09366c228c12eb8bef4e73e85039c23e12835245","head":{"label":"jasonfellows:select-wrap","ref":"select-wrap","sha":"09366c228c12eb8bef4e73e85039c23e12835245","user":{"login":"jasonfellows","id":1119770,"avatar_url":"https://avatars.githubusercontent.com/u/1119770?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonfellows","html_url":"https://github.com/jasonfellows","followers_url":"https://api.github.com/users/jasonfellows/followers","following_url":"https://api.github.com/users/jasonfellows/following{/other_user}","gists_url":"https://api.github.com/users/jasonfellows/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonfellows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonfellows/subscriptions","organizations_url":"https://api.github.com/users/jasonfellows/orgs","repos_url":"https://api.github.com/users/jasonfellows/repos","events_url":"https://api.github.com/users/jasonfellows/events{/privacy}","received_events_url":"https://api.github.com/users/jasonfellows/received_events","type":"User","site_admin":false},"repo":{"id":42682852,"name":"styleguide-1","full_name":"jasonfellows/styleguide-1","owner":{"login":"jasonfellows","id":1119770,"avatar_url":"https://avatars.githubusercontent.com/u/1119770?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonfellows","html_url":"https://github.com/jasonfellows","followers_url":"https://api.github.com/users/jasonfellows/followers","following_url":"https://api.github.com/users/jasonfellows/following{/other_user}","gists_url":"https://api.github.com/users/jasonfellows/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonfellows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonfellows/subscriptions","organizations_url":"https://api.github.com/users/jasonfellows/orgs","repos_url":"https://api.github.com/users/jasonfellows/repos","events_url":"https://api.github.com/users/jasonfellows/events{/privacy}","received_events_url":"https://api.github.com/users/jasonfellows/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jasonfellows/styleguide-1","description":"Namely Styleguide","fork":true,"url":"https://api.github.com/repos/jasonfellows/styleguide-1","forks_url":"https://api.github.com/repos/jasonfellows/styleguide-1/forks","keys_url":"https://api.github.com/repos/jasonfellows/styleguide-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasonfellows/styleguide-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasonfellows/styleguide-1/teams","hooks_url":"https://api.github.com/repos/jasonfellows/styleguide-1/hooks","issue_events_url":"https://api.github.com/repos/jasonfellows/styleguide-1/issues/events{/number}","events_url":"https://api.github.com/repos/jasonfellows/styleguide-1/events","assignees_url":"https://api.github.com/repos/jasonfellows/styleguide-1/assignees{/user}","branches_url":"https://api.github.com/repos/jasonfellows/styleguide-1/branches{/branch}","tags_url":"https://api.github.com/repos/jasonfellows/styleguide-1/tags","blobs_url":"https://api.github.com/repos/jasonfellows/styleguide-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasonfellows/styleguide-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasonfellows/styleguide-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasonfellows/styleguide-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasonfellows/styleguide-1/statuses/{sha}","languages_url":"https://api.github.com/repos/jasonfellows/styleguide-1/languages","stargazers_url":"https://api.github.com/repos/jasonfellows/styleguide-1/stargazers","contributors_url":"https://api.github.com/repos/jasonfellows/styleguide-1/contributors","subscribers_url":"https://api.github.com/repos/jasonfellows/styleguide-1/subscribers","subscription_url":"https://api.github.com/repos/jasonfellows/styleguide-1/subscription","commits_url":"https://api.github.com/repos/jasonfellows/styleguide-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasonfellows/styleguide-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasonfellows/styleguide-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasonfellows/styleguide-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/jasonfellows/styleguide-1/contents/{+path}","compare_url":"https://api.github.com/repos/jasonfellows/styleguide-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasonfellows/styleguide-1/merges","archive_url":"https://api.github.com/repos/jasonfellows/styleguide-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasonfellows/styleguide-1/downloads","issues_url":"https://api.github.com/repos/jasonfellows/styleguide-1/issues{/number}","pulls_url":"https://api.github.com/repos/jasonfellows/styleguide-1/pulls{/number}","milestones_url":"https://api.github.com/repos/jasonfellows/styleguide-1/milestones{/number}","notifications_url":"https://api.github.com/repos/jasonfellows/styleguide-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasonfellows/styleguide-1/labels{/name}","releases_url":"https://api.github.com/repos/jasonfellows/styleguide-1/releases{/id}","created_at":"2015-09-17T21:27:12Z","updated_at":"2015-09-17T21:27:13Z","pushed_at":"2015-11-02T18:27:22Z","git_url":"git://github.com/jasonfellows/styleguide-1.git","ssh_url":"git@github.com:jasonfellows/styleguide-1.git","clone_url":"https://github.com/jasonfellows/styleguide-1.git","svn_url":"https://github.com/jasonfellows/styleguide-1","homepage":"http://www.namely.com","size":2902,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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":0,"default_branch":"develop"}},"base":{"label":"namely:develop","ref":"develop","sha":"03311c497952a7e48277e05c6dea359d8b4dccc5","user":{"login":"namely","id":1004321,"avatar_url":"https://avatars.githubusercontent.com/u/1004321?v=3","gravatar_id":"","url":"https://api.github.com/users/namely","html_url":"https://github.com/namely","followers_url":"https://api.github.com/users/namely/followers","following_url":"https://api.github.com/users/namely/following{/other_user}","gists_url":"https://api.github.com/users/namely/gists{/gist_id}","starred_url":"https://api.github.com/users/namely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namely/subscriptions","organizations_url":"https://api.github.com/users/namely/orgs","repos_url":"https://api.github.com/users/namely/repos","events_url":"https://api.github.com/users/namely/events{/privacy}","received_events_url":"https://api.github.com/users/namely/received_events","type":"Organization","site_admin":false},"repo":{"id":33895865,"name":"styleguide","full_name":"namely/styleguide","owner":{"login":"namely","id":1004321,"avatar_url":"https://avatars.githubusercontent.com/u/1004321?v=3","gravatar_id":"","url":"https://api.github.com/users/namely","html_url":"https://github.com/namely","followers_url":"https://api.github.com/users/namely/followers","following_url":"https://api.github.com/users/namely/following{/other_user}","gists_url":"https://api.github.com/users/namely/gists{/gist_id}","starred_url":"https://api.github.com/users/namely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namely/subscriptions","organizations_url":"https://api.github.com/users/namely/orgs","repos_url":"https://api.github.com/users/namely/repos","events_url":"https://api.github.com/users/namely/events{/privacy}","received_events_url":"https://api.github.com/users/namely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/namely/styleguide","description":"Namely Styleguide","fork":false,"url":"https://api.github.com/repos/namely/styleguide","forks_url":"https://api.github.com/repos/namely/styleguide/forks","keys_url":"https://api.github.com/repos/namely/styleguide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/namely/styleguide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/namely/styleguide/teams","hooks_url":"https://api.github.com/repos/namely/styleguide/hooks","issue_events_url":"https://api.github.com/repos/namely/styleguide/issues/events{/number}","events_url":"https://api.github.com/repos/namely/styleguide/events","assignees_url":"https://api.github.com/repos/namely/styleguide/assignees{/user}","branches_url":"https://api.github.com/repos/namely/styleguide/branches{/branch}","tags_url":"https://api.github.com/repos/namely/styleguide/tags","blobs_url":"https://api.github.com/repos/namely/styleguide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/namely/styleguide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/namely/styleguide/git/refs{/sha}","trees_url":"https://api.github.com/repos/namely/styleguide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/namely/styleguide/statuses/{sha}","languages_url":"https://api.github.com/repos/namely/styleguide/languages","stargazers_url":"https://api.github.com/repos/namely/styleguide/stargazers","contributors_url":"https://api.github.com/repos/namely/styleguide/contributors","subscribers_url":"https://api.github.com/repos/namely/styleguide/subscribers","subscription_url":"https://api.github.com/repos/namely/styleguide/subscription","commits_url":"https://api.github.com/repos/namely/styleguide/commits{/sha}","git_commits_url":"https://api.github.com/repos/namely/styleguide/git/commits{/sha}","comments_url":"https://api.github.com/repos/namely/styleguide/comments{/number}","issue_comment_url":"https://api.github.com/repos/namely/styleguide/issues/comments{/number}","contents_url":"https://api.github.com/repos/namely/styleguide/contents/{+path}","compare_url":"https://api.github.com/repos/namely/styleguide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/namely/styleguide/merges","archive_url":"https://api.github.com/repos/namely/styleguide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/namely/styleguide/downloads","issues_url":"https://api.github.com/repos/namely/styleguide/issues{/number}","pulls_url":"https://api.github.com/repos/namely/styleguide/pulls{/number}","milestones_url":"https://api.github.com/repos/namely/styleguide/milestones{/number}","notifications_url":"https://api.github.com/repos/namely/styleguide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/namely/styleguide/labels{/name}","releases_url":"https://api.github.com/repos/namely/styleguide/releases{/id}","created_at":"2015-04-13T21:47:55Z","updated_at":"2015-08-20T21:10:07Z","pushed_at":"2015-11-02T18:27:22Z","git_url":"git://github.com/namely/styleguide.git","ssh_url":"git@github.com:namely/styleguide.git","clone_url":"https://github.com/namely/styleguide.git","svn_url":"https://github.com/namely/styleguide","homepage":"http://www.namely.com","size":5040,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":60,"forks":9,"open_issues":60,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/namely/styleguide/pulls/191"},"html":{"href":"https://github.com/namely/styleguide/pull/191"},"issue":{"href":"https://api.github.com/repos/namely/styleguide/issues/191"},"comments":{"href":"https://api.github.com/repos/namely/styleguide/issues/191/comments"},"review_comments":{"href":"https://api.github.com/repos/namely/styleguide/pulls/191/comments"},"review_comment":{"href":"https://api.github.com/repos/namely/styleguide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/namely/styleguide/pulls/191/commits"},"statuses":{"href":"https://api.github.com/repos/namely/styleguide/statuses/09366c228c12eb8bef4e73e85039c23e12835245"}}}}