From 34a45d084b879a65f417cddf3bdec9d1e0294b5a Mon Sep 17 00:00:00 2001 From: rstubryan Date: Mon, 13 Apr 2026 11:57:31 +0700 Subject: [PATCH] refactor(FE-modal-close-when-reset): Close filter modal when resetting dashboard filters --- src/components/pages/dashboard/DashboardProduction.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/pages/dashboard/DashboardProduction.tsx b/src/components/pages/dashboard/DashboardProduction.tsx index 62f5840f..81254442 100644 --- a/src/components/pages/dashboard/DashboardProduction.tsx +++ b/src/components/pages/dashboard/DashboardProduction.tsx @@ -225,7 +225,8 @@ const DashboardProduction = () => { setAnalysisMode('OVERVIEW'); setSelectedLocationIds([]); setRawKandangInputValue(''); - }, [resetForm, resetFilterValues]); + filterModal.closeModal(); + }, [filterModal, resetForm, resetFilterValues]); // ===== Formik Error List ===== const { formErrorList, close, handleFormSubmit } = useFormikErrorList(formik);