mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Call loadNextPage function only when it is required while loading the table.
This commit is contained in:
@@ -123,7 +123,7 @@ export function Table({ columns, data, hasSelectRow, schema, sortOptions, tableP
|
||||
useInfiniteQuery({
|
||||
queryKey: ['logs'],
|
||||
queryFn: async () => {
|
||||
const fetchedData = await loadNextPage();
|
||||
const fetchedData = loadNextPage ? await loadNextPage() : [];
|
||||
return fetchedData;
|
||||
},
|
||||
initialPageParam: 0,
|
||||
|
||||
Reference in New Issue
Block a user