fix(nav): product-switch dropdown reageert weer op klik
Base UI's Menu.Item vuurt geen React-onSelect af bij activatie; alleen onClick werkt. handleSwitchProduct werd daardoor nooit aangeroepen. user-menu.tsx en sprint-backlog.tsx gebruiken al onClick — NavBar miste deze workaround. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b47f62966e
commit
2aa3bc463f
1 changed files with 1 additions and 1 deletions
|
|
@ -163,7 +163,7 @@ export function NavBar({
|
||||||
{products.map(p => (
|
{products.map(p => (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
key={p.id}
|
key={p.id}
|
||||||
onSelect={() => p.id !== activeProduct.id && handleSwitchProduct(p.id)}
|
onClick={() => p.id !== activeProduct.id && handleSwitchProduct(p.id)}
|
||||||
className={cn(
|
className={cn(
|
||||||
p.id === activeProduct.id && 'bg-primary-container text-primary-container-foreground font-medium'
|
p.id === activeProduct.id && 'bg-primary-container text-primary-container-foreground font-medium'
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue