Improve performances on main

This commit is contained in:
Charles Bochet
2024-03-23 16:11:49 +01:00
parent 0315f35979
commit bd8718269a
2 changed files with 3 additions and 1 deletions

View File

@ -136,8 +136,10 @@ export const useExportTableData = ({
? selectedFindManyParams
: findManyRecordsParams;
// Todo: this needs to be done on click on the Export not button, not to be reactive. Use Lazy query for example
const { totalCount, records, fetchMoreRecords } = useFindManyRecords({
...usedFindManyParams,
depth: 0,
limit: pageSize,
onCompleted: (_data, { hasNextPage }) => {
setHasNextPage(hasNextPage ?? false);