From 8b970aeb643311ca6002d61ac5d5672b03115c78 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Mon, 13 Apr 2026 11:01:00 +0700 Subject: [PATCH] fix: open filter modal when component is mounted --- .../pages/report/marketing/tab/HppPerKandangTab.tsx | 4 ++++ .../tab/ProductionResultProjectFlockKandangTab.tsx | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/components/pages/report/marketing/tab/HppPerKandangTab.tsx b/src/components/pages/report/marketing/tab/HppPerKandangTab.tsx index 9e0bca2d..08f4e890 100644 --- a/src/components/pages/report/marketing/tab/HppPerKandangTab.tsx +++ b/src/components/pages/report/marketing/tab/HppPerKandangTab.tsx @@ -791,6 +791,10 @@ const HppPerKandangTab = ({ tabId }: HppPerKandangTabProps) => { [data, perWeightRangeSummary] ); + useEffectHook(() => { + filterModal.openModal(); + }, []); + return ( <> {TabActionsElement} diff --git a/src/components/pages/report/production-result/tab/ProductionResultProjectFlockKandangTab.tsx b/src/components/pages/report/production-result/tab/ProductionResultProjectFlockKandangTab.tsx index 8b5b5e9c..eb2c629c 100644 --- a/src/components/pages/report/production-result/tab/ProductionResultProjectFlockKandangTab.tsx +++ b/src/components/pages/report/production-result/tab/ProductionResultProjectFlockKandangTab.tsx @@ -631,6 +631,10 @@ const ProductionResultContent = ({ tabId }: ProductionResultTabProps) => { // Render the TabActions component const TabActionsElement = useMemo(() => , [TabActions]); + useEffect(() => { + filterModal.openModal(); + }, []); + return ( <> {TabActionsElement}