Skip to content

Commit

Permalink
Merge pull request #24023 from joh42/fix/23768
Browse files Browse the repository at this point in the history
Fix: resetting the country/state picker when it is reopened
  • Loading branch information
MariaHCD authored Aug 2, 2023
2 parents 556f92a + d50af95 commit 564d705
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/CountryPicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function CountryPicker({value, errorText, onInputChange, forwardedRef}) {
}, [value, allCountries]);

const showPickerModal = () => {
setSearchValue(lodashGet(allCountries, value, ''));
setIsPickerVisible(true);
};

Expand Down
1 change: 1 addition & 0 deletions src/components/StatePicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function StatePicker({value, errorText, onInputChange, forwardedRef}) {
}, [value, allStates]);

const showPickerModal = () => {
setSearchValue(lodashGet(allStates, `${value}.stateName`, ''));
setIsPickerVisible(true);
};

Expand Down

0 comments on commit 564d705

Please # to comment.