From 41c9ae30e9a6771a8dc3a609210a9a63146fa289 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sat, 1 Nov 2025 19:45:16 +0100 Subject: [PATCH] fix --- frontend/src/documents/DocumentsTable.jsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/documents/DocumentsTable.jsx b/frontend/src/documents/DocumentsTable.jsx index 322daf4..d34f704 100644 --- a/frontend/src/documents/DocumentsTable.jsx +++ b/frontend/src/documents/DocumentsTable.jsx @@ -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 = ({ ); })} - ) : noResults ? null : ( + ) : !showTableRows ? null : (