fix: received invoices — show skeleton only on initial load, not on sort/filter
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user