Skip to content

Commit

Permalink
fix state populate in back and forths
Browse files Browse the repository at this point in the history
  • Loading branch information
Salar Hafezi committed May 7, 2020
1 parent 2020abe commit ade4d64
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ class AddressDetails extends Component {
onSubmit={(values, actions) => {
if (isDesktop() && values.address_state) {
values.address_state = this.props.states_list.length
? getLocation(this.props.states_list, values.address_state, 'value')
? this.state.address_state_to_display
? getLocation(this.props.states_list, this.state.address_state_to_display, 'value')
: getLocation(this.props.states_list, values.address_state, 'value')
: values.address_state;
}
this.props.onSubmit(this.props.index, values, actions.setSubmitting);
Expand Down

0 comments on commit ade4d64

Please sign in to comment.