From 267ef9d8121533bee4c817ed239b99748a44d8c3 Mon Sep 17 00:00:00 2001 From: rstubryan Date: Thu, 5 Mar 2026 11:01:52 +0700 Subject: [PATCH] refactor(FE): Refactor CustomerPaymentTab to use filterParams instead of formik values --- .../pages/report/finance/tab/CustomerPaymentTab.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/pages/report/finance/tab/CustomerPaymentTab.tsx b/src/components/pages/report/finance/tab/CustomerPaymentTab.tsx index b04ce96a..b0c2637e 100644 --- a/src/components/pages/report/finance/tab/CustomerPaymentTab.tsx +++ b/src/components/pages/report/finance/tab/CustomerPaymentTab.tsx @@ -119,7 +119,6 @@ const CustomerPaymentTab = ({ tabId }: CustomerPaymentTabProps) => { }, }); - // Set the ref callback after formik is initialized handleFilterModalOpenRef.current = () => { filterModal.openModal(); formik.validateForm(); @@ -360,15 +359,12 @@ const CustomerPaymentTab = ({ tabId }: CustomerPaymentTabProps) => { (state) => state.clearTabActions ); - const formikValuesRef = useRef(formik.values); - formikValuesRef.current = formik.values; - useEffect(() => { setTabActions( tabId,
handleFilterModalOpenRef.current()} variant='outline' @@ -449,7 +445,7 @@ const CustomerPaymentTab = ({ tabId }: CustomerPaymentTabProps) => { handleExportPdf, isExcelExportLoading, isPdfExportLoading, - formik.values, + filterParams, ]); const TabActionsElement = useMemo(() => , [TabActions]);