Skip to content

Commit

Permalink
Fix change language onChange bug (#972)
Browse files Browse the repository at this point in the history
Close #971
  • Loading branch information
Anu-Ujin authored and batamar committed Jun 8, 2019
1 parent a740a5b commit 068dbbd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/modules/settings/general/components/List.tsx
Expand Up @@ -43,8 +43,11 @@ class List extends React.Component<Props, State> {
save = e => {
e.preventDefault();

this.props.save('dealCurrency', this.state.currencies);
this.props.save('dealUOM', this.state.uom);
const { currencies, uom, language } = this.state;

this.props.save('dealCurrency', currencies);
this.props.save('dealUOM', uom);
this.props.changeLanguage(language);
};

onCurrenciesChange = currencies => {
Expand All @@ -56,8 +59,7 @@ class List extends React.Component<Props, State> {
};

onLanguageChange = language => {
this.setState({ language });
this.props.changeLanguage(language.value);
this.setState({ language: language.value });
};

render() {
Expand Down

0 comments on commit 068dbbd

Please sign in to comment.