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);

View File

@ -36,7 +36,7 @@ export const PrefetchRunQueriesEffect = () => {
objectMetadataItemView,
objectMetadataItemFavorite,
],
depth: 2,
depth: 1,
});
const { data } = useQuery<MultiObjectRecordQueryResult>(