From f9a69a422ba6e2fcf1da2f0b9c2f6b741d0980ea Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Wed, 7 Oct 2020 16:42:40 +1100 Subject: [PATCH] Fix token and map setting update reset on modal closure --- src/modals/EditMapModal.js | 2 ++ src/modals/EditTokenModal.js | 1 + 2 files changed, 3 insertions(+) diff --git a/src/modals/EditMapModal.js b/src/modals/EditMapModal.js index 855b630..af51f70 100644 --- a/src/modals/EditMapModal.js +++ b/src/modals/EditMapModal.js @@ -13,6 +13,8 @@ function EditMapModal({ isOpen, onDone, map, mapState }) { const { updateMap, updateMapState } = useContext(MapDataContext); function handleClose() { + setMapSettingChanges({}); + setMapStateSettingChanges({}); onDone(); } diff --git a/src/modals/EditTokenModal.js b/src/modals/EditTokenModal.js index 6bf2c37..b6c0455 100644 --- a/src/modals/EditTokenModal.js +++ b/src/modals/EditTokenModal.js @@ -12,6 +12,7 @@ function EditTokenModal({ isOpen, onDone, token }) { const { updateToken } = useContext(TokenDataContext); function handleClose() { + setTokenSettingChanges({}); onDone(); }