This commit is contained in:
2025-11-01 19:45:16 +01:00
parent 03bc311403
commit 41c9ae30e9
+7 -5
View File
@@ -474,10 +474,12 @@ const DocumentsTable = ({
[activeCorrespondentIdSet, onCorrespondentClick],
);
const noResults = rows.length === 0;
const showDefaultEmptyState = !showingSearchResults && !isFilterActive && !subfolders.length && noResults;
const showListSearchEmptyState = showingSearchResults && noResults && !isGridView && !isSearchLoading;
const showGridSearchEmptyState = isGridView && showingSearchResults && noResults && !isSearchLoading;
const noDocumentRows = rows.length === 0;
const hasFolderRows = !showingSearchResults && subfolders.length > 0;
const showTableRows = hasFolderRows || !noDocumentRows;
const showDefaultEmptyState = !showingSearchResults && !isFilterActive && !hasFolderRows && noDocumentRows;
const showListSearchEmptyState = showingSearchResults && noDocumentRows && !isGridView && !isSearchLoading;
const showGridSearchEmptyState = isGridView && showingSearchResults && noDocumentRows && !isSearchLoading;
const showSearchHint = showingSearchResults && rows.length > 0;
const breadcrumbEntries = useMemo(() => (Array.isArray(breadcrumbs) ? breadcrumbs.filter(Boolean) : []), [breadcrumbs]);
const trailEntries = useMemo(() => {
@@ -773,7 +775,7 @@ const DocumentsTable = ({
);
})}
</div>
) : noResults ? null : (
) : !showTableRows ? null : (
<table aria-multiselectable="true">
<thead>
<tr>