Skip to content

Commit

Permalink
Call loadNextPage function only when it is required while loading the…
Browse files Browse the repository at this point in the history
… table.
  • Loading branch information
khushboovashi committed Jul 22, 2024
1 parent 9cbb9a3 commit 3aedae1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/pgadmin/static/js/components/PgTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3aedae1

Please sign in to comment.