mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 01:36:30 +02:00
refactor: change page size parameter to -1 for fetching all documents in useDocuments hook
This commit is contained in:
parent
c706b5f417
commit
d5fd4c2863
1 changed files with 1 additions and 3 deletions
|
|
@ -6,8 +6,6 @@ import { documentsApiService } from "@/lib/apis/documents-api.service";
|
|||
import type { SyncHandle } from "@/lib/electric/client";
|
||||
import { useElectricClient } from "@/lib/electric/context";
|
||||
|
||||
const PAGE_SIZE = 100;
|
||||
|
||||
// Stable empty array to prevent infinite re-renders when no typeFilter is provided
|
||||
const EMPTY_TYPE_FILTER: DocumentTypeEnum[] = [];
|
||||
|
||||
|
|
@ -165,7 +163,7 @@ export function useDocuments(
|
|||
queryParams: {
|
||||
search_space_id: spaceId,
|
||||
page: 0,
|
||||
page_size: PAGE_SIZE,
|
||||
page_size: -1, // Fetch all documents
|
||||
...(currentTypeFilter.length > 0 && { document_types: currentTypeFilter }),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue