change(ui): keep report state on modal close except the cancel button
This commit is contained in:
parent
0f9e31f998
commit
3d719e6ecd
1 changed files with 6 additions and 2 deletions
|
|
@ -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,
|
|||
<Button icon="file-pdf" variant="primary" onClick={onGen} loading={isRendering}>
|
||||
Download Bug Report
|
||||
</Button>
|
||||
<Button variant="text-primary" onClick={hideModal}>
|
||||
<Button variant="text-primary" onClick={onClose}>
|
||||
Close
|
||||
</Button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue