{"action":"closed","issue":{"url":"https://api.github.com/repos/influitive/patternity/issues/28","labels_url":"https://api.github.com/repos/influitive/patternity/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/influitive/patternity/issues/28/comments","events_url":"https://api.github.com/repos/influitive/patternity/issues/28/events","html_url":"https://github.com/influitive/patternity/issues/28","id":68739052,"number":28,"title":"Options for SelectDropdown","user":{"login":"tylerchamberland","id":4643360,"avatar_url":"https://avatars.githubusercontent.com/u/4643360?v=3","gravatar_id":"","url":"https://api.github.com/users/tylerchamberland","html_url":"https://github.com/tylerchamberland","followers_url":"https://api.github.com/users/tylerchamberland/followers","following_url":"https://api.github.com/users/tylerchamberland/following{/other_user}","gists_url":"https://api.github.com/users/tylerchamberland/gists{/gist_id}","starred_url":"https://api.github.com/users/tylerchamberland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tylerchamberland/subscriptions","organizations_url":"https://api.github.com/users/tylerchamberland/orgs","repos_url":"https://api.github.com/users/tylerchamberland/repos","events_url":"https://api.github.com/users/tylerchamberland/events{/privacy}","received_events_url":"https://api.github.com/users/tylerchamberland/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-15T17:19:14Z","updated_at":"2015-07-03T14:31:53Z","closed_at":"2015-07-03T14:31:53Z","body":"when using the SelectDropdown from patternity in multiple places in one form I noticed I've fallen kindof into a pattern of writing code like this...\r\n\r\n    <SelectDropdown name=\"maven_network_opt_in\" value={ company.maven_network_opt_in }                                      \r\n                                 onChange={ this._update }>\r\n                  { this._mavenOptions() }\r\n    </SelectDropdown>\r\n \r\n    _mavenOptions: function() {\r\n      return this._buildOptionList(this.props.mavenOptions);\r\n    },\r\n\r\n    _buildOptionList: function(options) {\r\n      return _.map(options, function(option) {\r\n        return (<option key={option.value} value={option.value}>{option.label}</option>);\r\n      });\r\n    },\r\n\r\nIt seems like it be nice to have an optional \"builder\" component to streamline this a little bit:\r\n\r\n    <SelectDropdown.OptionGroup options={ this.props.mavenOptions} />"}}