Improve messaging on no results with applied filter

This commit is contained in:
Bogdan
2024-07-25 08:08:48 +03:00
parent cc7769b601
commit 4c99971882
6 changed files with 20 additions and 16 deletions

View File

@@ -282,7 +282,7 @@ class SearchIndex extends Component {
const ViewComponent = getViewComponent(isSmallScreen);
const isLoaded = !!(!error && isPopulated && items.length && this.scrollerRef.current);
const hasNoIndexer = !totalItems;
const hasNoSearchResults = !totalItems;
return (
<PageContent title={translate('Search')}>
@@ -306,7 +306,7 @@ class SearchIndex extends Component {
<SearchIndexSortMenu
sortKey={sortKey}
sortDirection={sortDirection}
isDisabled={hasNoIndexer}
isDisabled={hasNoSearchResults}
onSortSelect={onSortSelect}
/>
@@ -314,7 +314,7 @@ class SearchIndex extends Component {
selectedFilterKey={selectedFilterKey}
filters={filters}
customFilters={customFilters}
isDisabled={hasNoIndexer}
isDisabled={hasNoSearchResults}
onFilterSelect={onFilterSelect}
/>
</PageToolbarSection>