From 885b8718fa9694087d5246c2714929b18ac30c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Szyma=C5=84ski?= Date: Thu, 12 Dec 2019 10:08:19 +0100 Subject: [PATCH] Fix country assign on create shipping zone screen --- .../ShippingZoneCreatePage.tsx | 29 ++++++------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx b/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx index 5e97c0f0d..4f59d29e1 100644 --- a/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx +++ b/src/shipping/components/ShippingZoneCreatePage/ShippingZoneCreatePage.tsx @@ -113,26 +113,15 @@ const ShippingZoneCreatePage: React.FC = ({ - change( - { - target: { - name: "default", - value: formData.restOfTheWorld - } - } as any, - () => - change( - { - target: { - name: "countries", - value: formData.restOfTheWorld ? [] : formData.countries - } - } as any, - toggleModal - ) - ) - } + onConfirm={formData => { + change({ + target: { + name: "countries", + value: formData.restOfTheWorld ? [] : formData.countries + } + } as any); + toggleModal(); + }} confirmButtonState="default" countries={countries} initial={data.countries}