only show filters pane when there are actual filters

This commit is contained in:
Josh Hawkins 2024-09-17 12:10:18 -05:00
parent b75ea9cb45
commit 303d5e6354

View File

@ -456,7 +456,8 @@ export default function InputWithTags({
)} )}
</div> </div>
</div> </div>
{(showFilters || showSuggestions) && ( {((showFilters && Object.keys(filters).length > 0) ||
showSuggestions) && (
<div className="absolute left-0 top-12 z-[100] w-full rounded-md border border-t-0 border-secondary-foreground bg-background p-2 text-primary shadow-md"> <div className="absolute left-0 top-12 z-[100] w-full rounded-md border border-t-0 border-secondary-foreground bg-background p-2 text-primary shadow-md">
{showFilters && Object.keys(filters).length > 0 && ( {showFilters && Object.keys(filters).length > 0 && (
<div ref={filterRef} className="my-2 flex flex-wrap gap-2"> <div ref={filterRef} className="my-2 flex flex-wrap gap-2">