Fix filter popovers for select and multi select fields

This commit is contained in:
Hakan Shehu
2024-10-26 19:02:25 +02:00
parent 9519c2db69
commit bfee92f2ac
2 changed files with 12 additions and 2 deletions

View File

@@ -114,7 +114,7 @@ export const ViewMultiSelectFieldFilter = ({
{!hideInput && (
<Popover>
<PopoverTrigger asChild>
<div className="flex h-full w-full cursor-pointer flex-row items-center gap-1 rounded-md border border-input p-1">
<div className="flex h-full w-full cursor-pointer flex-row items-center gap-1 rounded-md border border-input p-2">
{selectedOptions.map((option) => (
<SelectOptionBadge
key={option.id}
@@ -122,6 +122,11 @@ export const ViewMultiSelectFieldFilter = ({
color={option.color}
/>
))}
{selectedOptions.length === 0 && (
<p className="text-xs text-muted-foreground">
No options selected
</p>
)}
</div>
</PopoverTrigger>
<PopoverContent className="w-80 p-1">

View File

@@ -114,7 +114,7 @@ export const ViewSelectFieldFilter = ({
{!hideInput && (
<Popover>
<PopoverTrigger asChild>
<div className="flex h-full w-full cursor-pointer flex-row items-center gap-1 rounded-md border border-input p-1">
<div className="flex h-full w-full cursor-pointer flex-row items-center gap-1 rounded-md border border-input p-2">
{selectedOptions.map((option) => (
<SelectOptionBadge
key={option.id}
@@ -122,6 +122,11 @@ export const ViewSelectFieldFilter = ({
color={option.color}
/>
))}
{selectedOptions.length === 0 && (
<p className="text-xs text-muted-foreground">
No options selected
</p>
)}
</div>
</PopoverTrigger>
<PopoverContent className="w-80 p-1">