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
|
// Fetch list
|
||||||
const fetchList = useCallback(async () => {
|
const fetchList = useCallback(async () => {
|
||||||
setLoading(true)
|
if (!hasLoadedOnce.current) setLoading(true)
|
||||||
try {
|
try {
|
||||||
const params = new URLSearchParams({
|
const params = new URLSearchParams({
|
||||||
month: String(statsMonth),
|
month: String(statsMonth),
|
||||||
@@ -171,6 +171,7 @@ export default function ReceivedInvoices({ statsMonth, statsYear, uploadOpen, se
|
|||||||
}
|
}
|
||||||
} catch { /* ignore */ } finally {
|
} catch { /* ignore */ } finally {
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
|
hasLoadedOnce.current = true
|
||||||
}
|
}
|
||||||
}, [statsMonth, statsYear, search, sort, order])
|
}, [statsMonth, statsYear, search, sort, order])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user