From 3d719e6ecd58d3f536e02d7176bf9ffb7148b246 Mon Sep 17 00:00:00 2001 From: sylenien Date: Mon, 7 Nov 2022 11:06:47 +0100 Subject: [PATCH] change(ui): keep report state on modal close except the cancel button --- .../app/components/Session_/BugReport/BugReportModal.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/app/components/Session_/BugReport/BugReportModal.tsx b/frontend/app/components/Session_/BugReport/BugReportModal.tsx index 34f264d96..da4fa64b7 100644 --- a/frontend/app/components/Session_/BugReport/BugReportModal.tsx +++ b/frontend/app/components/Session_/BugReport/BugReportModal.tsx @@ -82,9 +82,13 @@ function BugReportModal({ hideModal, session, width, height, account, xrayProps, fetchMembers() bugReportStore.updateReportDefaults(defaults); bugReportStore.setDefaultSteps(mapEvents(events)); - return () => bugReportStore.clearStore(); }, []); + const onClose = () => { + hideModal(); + return bugReportStore.clearStore(); + } + const onGen = () => { // @ts-ignore import('html2canvas').then(({ default: html2canvas }) => { @@ -192,7 +196,7 @@ function BugReportModal({ hideModal, session, width, height, account, xrayProps, -