From e0fbae153025a79d2a363b76532e5474c08eba60 Mon Sep 17 00:00:00 2001 From: BOHA Date: Mon, 23 Mar 2026 11:03:22 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20received=20invoices=20=E2=80=94=20show?= =?UTF-8?q?=20skeleton=20only=20on=20initial=20load,=20not=20on=20sort/fil?= =?UTF-8?q?ter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- src/admin/pages/ReceivedInvoices.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/admin/pages/ReceivedInvoices.tsx b/src/admin/pages/ReceivedInvoices.tsx index 4d0fb93..a19bd02 100644 --- a/src/admin/pages/ReceivedInvoices.tsx +++ b/src/admin/pages/ReceivedInvoices.tsx @@ -155,7 +155,7 @@ export default function ReceivedInvoices({ statsMonth, statsYear, uploadOpen, se // Fetch list const fetchList = useCallback(async () => { - setLoading(true) + if (!hasLoadedOnce.current) setLoading(true) try { const params = new URLSearchParams({ month: String(statsMonth), @@ -171,6 +171,7 @@ export default function ReceivedInvoices({ statsMonth, statsYear, uploadOpen, se } } catch { /* ignore */ } finally { setLoading(false) + hasLoadedOnce.current = true } }, [statsMonth, statsYear, search, sort, order])