Merge pull request #699 from mirumee/fix/address-dialog-submit

Fix not closed modal with two confirmations
This commit is contained in:
Dawid Tarasiuk 2020-09-09 11:25:38 +02:00 committed by GitHub
commit 731d15c9c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -36,6 +36,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Update savebar design - #690 by @dominik-zeglen
- Add metadata to orders - #688 by @dominik-zeglen
- Add lazyload to locales - #692 by @eaglesemanation
- Fix not closed address update modal with two confirmations - #699 by @orzechdev
## 2.10.1

View file

@ -80,7 +80,7 @@ const OrderAddressEditDialog: React.FC<OrderAddressEditDialogProps> = props => {
return (
<Dialog onClose={onClose} open={open} classes={{ paper: classes.overflow }}>
<Form initial={address} onSubmit={handleSubmit}>
{({ change, data, submit }) => {
{({ change, data }) => {
const handleCountrySelect = createSingleAutocompleteSelectHandler(
change,
setCountryDisplayName,
@ -118,7 +118,6 @@ const OrderAddressEditDialog: React.FC<OrderAddressEditDialogProps> = props => {
transitionState={confirmButtonState}
color="primary"
variant="contained"
onClick={submit}
type="submit"
>
<FormattedMessage {...buttonMessages.confirm} />

View file

@ -160,6 +160,7 @@ export const OrderDetailsMessages: React.FC<OrderDetailsMessages> = ({
defaultMessage: "Order successfully updated"
})
});
closeModal();
}
};
const handleDraftUpdate = (data: OrderDraftUpdate) => {