Skip to content

Commit

Permalink
only show the 'More filters' button if there are more filters
Browse files Browse the repository at this point in the history
  • Loading branch information
zotya committed Nov 15, 2023
1 parent e2bbc26 commit 96dac21
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions searchlib/components/Facets/DropdownFacetsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,25 @@ const DropdownFacetsList = ({ defaultWrapper }) => {
wrapper="DropdownFacetWrapper"
/>
))}
<div className="dropdown-facet">
<Button
className="sui-button basic"
onClick={() => setShowSidebar(true)}
onKeyDown={(e) => {
if (e.key === 'Enter') {
setShowSidebar(true);
}
if (e.key === 'Escape') {
setShowSidebar(false);
}
}}
// disabled={isLiveSearch}
>
<span className="facet-title">+ More filters</span>
</Button>
</div>
{sidebarFacets.length > 0 && (
<div className="dropdown-facet">
<Button
className="sui-button basic"
onClick={() => setShowSidebar(true)}
onKeyDown={(e) => {
if (e.key === 'Enter') {
setShowSidebar(true);
}
if (e.key === 'Escape') {
setShowSidebar(false);
}
}}
// disabled={isLiveSearch}
>
<span className="facet-title">+ More filters</span>
</Button>
</div>
)}
{/*
{filterNames.length > 0 && (
<Button
Expand Down

0 comments on commit 96dac21

Please sign in to comment.