From 785695c01c45f732a1b761b6f8031dfe16d8f57b Mon Sep 17 00:00:00 2001 From: arc-alex Date: Sat, 18 Nov 2023 21:01:32 +0100 Subject: [PATCH] clear rundownState on modal close --- .../src/features/modals/sheets-modal/SheetsModal.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/client/src/features/modals/sheets-modal/SheetsModal.tsx b/apps/client/src/features/modals/sheets-modal/SheetsModal.tsx index 84a646c34..caadb1ee6 100644 --- a/apps/client/src/features/modals/sheets-modal/SheetsModal.tsx +++ b/apps/client/src/features/modals/sheets-modal/SheetsModal.tsx @@ -45,7 +45,12 @@ export default function SheetsModal(props: SheetsModalProps) { const sheetid = useRef(null); const worksheet = useRef(null); - const handleClose = () => onClose(); + const handleClose = () => { + setRundown(null); + setProject(null); + setUserFields(null); + onClose(); + }; const handleClick = () => { fileInputRef.current?.click(); };