Improve performances on main
This commit is contained in:
@ -136,8 +136,10 @@ export const useExportTableData = ({
|
|||||||
? selectedFindManyParams
|
? selectedFindManyParams
|
||||||
: findManyRecordsParams;
|
: 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({
|
const { totalCount, records, fetchMoreRecords } = useFindManyRecords({
|
||||||
...usedFindManyParams,
|
...usedFindManyParams,
|
||||||
|
depth: 0,
|
||||||
limit: pageSize,
|
limit: pageSize,
|
||||||
onCompleted: (_data, { hasNextPage }) => {
|
onCompleted: (_data, { hasNextPage }) => {
|
||||||
setHasNextPage(hasNextPage ?? false);
|
setHasNextPage(hasNextPage ?? false);
|
||||||
|
|||||||
@ -36,7 +36,7 @@ export const PrefetchRunQueriesEffect = () => {
|
|||||||
objectMetadataItemView,
|
objectMetadataItemView,
|
||||||
objectMetadataItemFavorite,
|
objectMetadataItemFavorite,
|
||||||
],
|
],
|
||||||
depth: 2,
|
depth: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
const { data } = useQuery<MultiObjectRecordQueryResult>(
|
const { data } = useQuery<MultiObjectRecordQueryResult>(
|
||||||
|
|||||||
Reference in New Issue
Block a user