diff --git a/packages/twenty-front/src/modules/object-record/record-index/export/hooks/useRecordIndexLazyFetchRecords.ts b/packages/twenty-front/src/modules/object-record/record-index/export/hooks/useRecordIndexLazyFetchRecords.ts index 0462e85716..3fb8b893ee 100644 --- a/packages/twenty-front/src/modules/object-record/record-index/export/hooks/useRecordIndexLazyFetchRecords.ts +++ b/packages/twenty-front/src/modules/object-record/record-index/export/hooks/useRecordIndexLazyFetchRecords.ts @@ -92,7 +92,11 @@ export const useRecordIndexLazyFetchRecords = ({ recordIndexId, ); - const queryFilter = computeContextStoreFilters({ + const isEmptySelection = + contextStoreTargetedRecordsRule.mode === 'selection' && + contextStoreTargetedRecordsRule.selectedRecordIds.length === 0; + + const contextStoreFilter = computeContextStoreFilters({ contextStoreTargetedRecordsRule, contextStoreFilters, contextStoreFilterGroups, @@ -101,6 +105,10 @@ export const useRecordIndexLazyFetchRecords = ({ contextStoreAnyFieldFilterValue, }); + const queryFilter = isEmptySelection + ? findManyRecordsParams.filter + : contextStoreFilter; + const visibleRecordFields = useAtomComponentSelectorValue( visibleRecordFieldsComponentSelector, recordIndexId,