fix(ui): remove filter icon and fix popover overflow on detail pages

This commit is contained in:
yiling
2026-05-25 19:45:04 +08:00
parent c72ecc051d
commit 00dc7f7bda
+18 -18
View File
@@ -15,7 +15,6 @@ import { Avatar, AvatarFallback } from '../ui/avatar'
import { Button } from '../ui/button' import { Button } from '../ui/button'
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover' import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover'
import { Separator } from '../ui/separator' import { Separator } from '../ui/separator'
import { Filter } from 'lucide-react'
type FileBrowserToolbarProps = { type FileBrowserToolbarProps = {
teamId: string teamId: string
@@ -164,7 +163,6 @@ export function FileBrowserToolbar({
size="sm" size="sm"
className="inline-flex items-center gap-2 px-4 py-2 hover:bg-primary/10 font-semibold rounded-xl cursor-pointer h-8" className="inline-flex items-center gap-2 px-4 py-2 hover:bg-primary/10 font-semibold rounded-xl cursor-pointer h-8"
> >
<Filter className="h-4 w-4" />
<span>Filter</span> <span>Filter</span>
{activeFiltersCount > 0 && ( {activeFiltersCount > 0 && (
<span className="ml-1 px-1.5 py-0.5 rounded-full text-[10px] font-mono font-bold bg-primary/50 border border-primary-foreground/20"> <span className="ml-1 px-1.5 py-0.5 rounded-full text-[10px] font-mono font-bold bg-primary/50 border border-primary-foreground/20">
@@ -173,22 +171,24 @@ export function FileBrowserToolbar({
)} )}
</Button> </Button>
</PopoverTrigger> </PopoverTrigger>
<PopoverContent className="w-[400px] p-0" align="start"> <PopoverContent className="w-[500px] p-0 overflow-hidden" align="start">
<FilterPanel <div className="max-h-[80vh] overflow-y-auto">
fields={fields} <FilterPanel
conditions={filterConditions} fields={fields}
onChange={(newConditions) => { conditions={filterConditions}
onFilterChange(newConditions) onChange={(newConditions) => {
onUpdateCollection?.({ onFilterChange(newConditions)
filter: { onUpdateCollection?.({
...collection.filter, filter: {
conditions: newConditions, ...collection.filter,
}, conditions: newConditions,
}) },
}} })
excludeFields={[]} }}
hidePrefix excludeFields={[]}
/> hidePrefix
/>
</div>
</PopoverContent> </PopoverContent>
</Popover> </Popover>
) : ( ) : (