Skip to content

Commit

Permalink
fix(example): Fix i18n button not updating (#1187) (#1194)
Browse files Browse the repository at this point in the history
  • Loading branch information
gihrig committed Nov 4, 2016
1 parent a81155f commit 73659ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/components/Toggle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function Toggle(props) {
}

return (
<Select onChange={props.onToggle}>
<Select value={props.value} onChange={props.onToggle}>
{content}
</Select>
);
Expand All @@ -29,6 +29,7 @@ function Toggle(props) {
Toggle.propTypes = {
onToggle: React.PropTypes.func,
values: React.PropTypes.array,
value: React.PropTypes.string,
messages: React.PropTypes.object,
};

Expand Down
3 changes: 2 additions & 1 deletion app/containers/LocaleToggle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ export class LocaleToggle extends React.PureComponent { // eslint-disable-line r
render() {
return (
<Wrapper>
<Toggle values={appLocales} messages={messages} onToggle={this.props.onLocaleToggle} />
<Toggle value={this.props.locale} values={appLocales} messages={messages} onToggle={this.props.onLocaleToggle} />
</Wrapper>
);
}
}

LocaleToggle.propTypes = {
onLocaleToggle: React.PropTypes.func,
locale: React.PropTypes.string,
};

const mapStateToProps = createSelector(
Expand Down

0 comments on commit 73659ac

Please sign in to comment.