Skip to content

Commit

Permalink
SitesDropdown: Accept onSiteSelect prop
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Dec 11, 2015
1 parent edd266d commit 71451cf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions client/components/sites-dropdown/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ export default React.createClass( {
showAllSites: React.PropTypes.bool,
indicator: React.PropTypes.bool,
autoFocus: React.PropTypes.bool,
onClose: React.PropTypes.func
onClose: React.PropTypes.func,
onSiteSelect: React.PropTypes.func
},

getDefaultProps() {
return {
showAllSites: false,
indicator: false,
onClose: noop
onClose: noop,
onSiteSelect: noop
};
},

Expand All @@ -52,6 +54,7 @@ export default React.createClass( {
},

selectSite( siteSlug ) {
this.props.onSiteSelect( siteSlug );
this.setState( {
selected: siteSlug,
open: false
Expand Down

0 comments on commit 71451cf

Please sign in to comment.