mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 17:56:25 +02:00
refactor: enhance DocumentsFilters and DocumentsTableShell components by replacing icons for improved clarity and optimizing loading state management in useDocuments hook
This commit is contained in:
parent
dfe483efcb
commit
b7ca656823
3 changed files with 164 additions and 187 deletions
|
|
@ -156,10 +156,13 @@ export function useDocuments(
|
|||
|
||||
let cancelled = false;
|
||||
|
||||
setLoading(true);
|
||||
setDocuments([]);
|
||||
setTotal(0);
|
||||
setHasMore(false);
|
||||
const isRefresh = initialLoadDoneRef.current;
|
||||
if (!isRefresh) {
|
||||
setLoading(true);
|
||||
setDocuments([]);
|
||||
setTotal(0);
|
||||
setHasMore(false);
|
||||
}
|
||||
apiLoadedCountRef.current = 0;
|
||||
initialLoadDoneRef.current = false;
|
||||
electricBaselineIdsRef.current = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue