From 1106cb8c92c9240e2bd855b3590c39a1ed722494 Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Thu, 12 Sep 2019 17:18:41 +0200 Subject: [PATCH] Closing modals do not allow to go back to them --- src/customers/views/CustomerList/CustomerList.tsx | 3 ++- src/discounts/views/SaleList/SaleList.tsx | 3 ++- src/discounts/views/VoucherList/VoucherList.tsx | 3 ++- src/orders/views/OrderDraftList/OrderDraftList.tsx | 3 ++- src/productTypes/views/ProductTypeList/ProductTypeList.tsx | 3 ++- src/shipping/views/ShippingZoneDetails/index.tsx | 2 +- src/staff/views/StaffList/StaffList.tsx | 3 ++- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/customers/views/CustomerList/CustomerList.tsx b/src/customers/views/CustomerList/CustomerList.tsx index d939c285a..68348ee99 100644 --- a/src/customers/views/CustomerList/CustomerList.tsx +++ b/src/customers/views/CustomerList/CustomerList.tsx @@ -84,7 +84,8 @@ export const CustomerList: React.StatelessComponent = ({ ...params, action: undefined, ids: undefined - }) + }), + true ); const openModal = (action: CustomerListUrlDialog, ids?: string[]) => diff --git a/src/discounts/views/SaleList/SaleList.tsx b/src/discounts/views/SaleList/SaleList.tsx index bca686bd2..0bfded879 100644 --- a/src/discounts/views/SaleList/SaleList.tsx +++ b/src/discounts/views/SaleList/SaleList.tsx @@ -87,7 +87,8 @@ export const SaleList: React.StatelessComponent = ({ ...params, action: undefined, ids: undefined - }) + }), + true ); const openModal = (action: SaleListUrlDialog, ids?: string[]) => diff --git a/src/discounts/views/VoucherList/VoucherList.tsx b/src/discounts/views/VoucherList/VoucherList.tsx index 27b2bef39..9de0be51c 100644 --- a/src/discounts/views/VoucherList/VoucherList.tsx +++ b/src/discounts/views/VoucherList/VoucherList.tsx @@ -87,7 +87,8 @@ export const VoucherList: React.StatelessComponent = ({ ...params, action: undefined, ids: undefined - }) + }), + true ); const openModal = (action: VoucherListUrlDialog, ids?: string[]) => diff --git a/src/orders/views/OrderDraftList/OrderDraftList.tsx b/src/orders/views/OrderDraftList/OrderDraftList.tsx index 64bcf19ef..826e942c6 100644 --- a/src/orders/views/OrderDraftList/OrderDraftList.tsx +++ b/src/orders/views/OrderDraftList/OrderDraftList.tsx @@ -86,7 +86,8 @@ export const OrderDraftList: React.StatelessComponent = ({ ...params, action: undefined, ids: undefined - }) + }), + true ); const handleCreateOrderCreateSuccess = (data: OrderDraftCreate) => { diff --git a/src/productTypes/views/ProductTypeList/ProductTypeList.tsx b/src/productTypes/views/ProductTypeList/ProductTypeList.tsx index 321a79199..542d3dd64 100644 --- a/src/productTypes/views/ProductTypeList/ProductTypeList.tsx +++ b/src/productTypes/views/ProductTypeList/ProductTypeList.tsx @@ -83,7 +83,8 @@ export const ProductTypeList: React.StatelessComponent< ...params, action: undefined, ids: undefined - }) + }), + true ); const openModal = (action: ProductTypeListUrlDialog, ids?: string[]) => diff --git a/src/shipping/views/ShippingZoneDetails/index.tsx b/src/shipping/views/ShippingZoneDetails/index.tsx index 34d87c403..c5410f1ee 100644 --- a/src/shipping/views/ShippingZoneDetails/index.tsx +++ b/src/shipping/views/ShippingZoneDetails/index.tsx @@ -33,7 +33,7 @@ const ShippingZoneDetails: React.StatelessComponent< const notify = useNotifier(); const intl = useIntl(); - const closeModal = () => navigate(shippingZoneUrl(id)); + const closeModal = () => navigate(shippingZoneUrl(id), true); const onShippingRateCreate = (data: CreateShippingRate) => { if (data.shippingPriceCreate.errors.length === 0) { diff --git a/src/staff/views/StaffList/StaffList.tsx b/src/staff/views/StaffList/StaffList.tsx index eb104ead5..0c07ecb56 100644 --- a/src/staff/views/StaffList/StaffList.tsx +++ b/src/staff/views/StaffList/StaffList.tsx @@ -78,7 +78,8 @@ export const StaffList: React.StatelessComponent = ({ ...params, action: undefined, ids: undefined - }) + }), + true ); const openModal = (action: StaffListUrlDialog, ids?: string[]) =>