Skip to content

Commit 8391ff5

Browse files
Rat01047Nurul Amin Ratul
andauthored
fix: dropdown stays open when clicking Inertia Link items (#32)
Co-authored-by: Nurul Amin Ratul <nurul.ratul@wedevs.com>
1 parent 091e8f3 commit 8391ff5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Components/Dropdown/DropdownItem.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ const DropdownItem: React.FC<DropdownItemProps> = ({
1515
}) => {
1616
return (
1717
<Menu.Item>
18-
{({ active }) => (
18+
{({ focus, close }) => (
1919
<div
20+
onClickCapture={close}
2021
className={cn(
2122
'hover:cursor-pointer',
22-
active ? activeClass : '',
23+
focus ? activeClass : '',
2324
className,
2425
)}
2526
>

0 commit comments

Comments
 (0)