mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
fix: clean up mobile repo controls and prevent event bubbling
- Remove unused currentFilterLabel variable in RepoListControls - Simplify mobile dropdown button to icon-only - Add event.stopPropagation() handlers to DropdownMenuContent - Set z-index to 200 to ensure dropdown appears above other content
This commit is contained in:
1 parent
1f6180e03c
commit
1f55bcdfc2
2 files changed
+7
-4
No files matched your search
@@ -54,7 +54,6 @@ export function RepoListControls({
|
||||
const [showMenu, setShowMenu] = useState(false)
|
||||
|
||||
const currentSortLabel = SORT_OPTIONS.find((s) => s.value === sortMode)?.label ?? 'Recent'
|
||||
const currentFilterLabel = FILTER_OPTIONS.find((f) => f.value === filterMode)?.label ?? 'All'
|
||||
|
||||
return (
|
||||
<div className="px-2 md:px-0 space-y-2">
|
||||
@@ -86,9 +85,8 @@ export function RepoListControls({
|
||||
{isMobile ? (
|
||||
<DropdownMenu open={showMenu} onOpenChange={setShowMenu}>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="outline" size="sm" className="gap-1.5">
|
||||
<Button variant="outline" size="sm">
|
||||
<SlidersHorizontal className="w-4 h-4" />
|
||||
<span>{currentFilterLabel}</span>
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end" className="w-48">
|
||||
|
||||
@@ -85,7 +85,12 @@ export function RepoRowActions({
|
||||
<MoreVertical className="w-4 h-4" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
<DropdownMenuContent
|
||||
align="end"
|
||||
className="z-[200]"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
onPointerDown={(e) => e.stopPropagation()}
|
||||
>
|
||||
<DropdownMenuItem
|
||||
onClick={() => handleSourceControlOpen(true)}
|
||||
disabled={!isReady}
|
||||
|
||||
Reference in new issue
Block a user