Skip to content

Commit

Permalink
Fix address form keeps country state from prev address provided (#4188)
Browse files Browse the repository at this point in the history
  • Loading branch information
poulch committed Sep 12, 2023
1 parent fba4004 commit 49a0fb2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/breezy-turtles-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Fix address form keeps country state from prev address provided
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,13 @@ const CustomerAddressDialog: React.FC<CustomerAddressDialogProps> = ({
fullWidth
maxWidth="sm"
>
<Form initial={initialForm} onSubmit={handleSubmit}>
<Form
initial={initialForm}
onSubmit={data => {
setCountryDisplayName("");
handleSubmit(data);
}}
>
{({ change, set, data }) => {
const countrySelect = createSingleAutocompleteSelectHandler(
change,
Expand Down

0 comments on commit 49a0fb2

Please sign in to comment.