Skip to content

Commit

Permalink
Merge pull request #16466 from Prince-Mendiratta/state-picker
Browse files Browse the repository at this point in the history
[StatePicker] USA to non USA address should not reset state field value
  • Loading branch information
techievivek authored Mar 28, 2023
2 parents fc65409 + 73b2823 commit 7003d95
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/AddressSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,14 @@ const AddressSearch = (props) => {
administrative_area_level_1: 'long_name',
});

// Make sure that the order of keys remains such that the country is always set above the state.
// Refer to https://github.com/Expensify/App/issues/15633 for more information.
const values = {
street: props.value ? props.value.trim() : '',
city: city || cityFallback,
zipCode,
state,
country: '',
state,
};

// If the address is not in the US, use the full length state name since we're displaying the address's
Expand Down

0 comments on commit 7003d95

Please sign in to comment.