fix: button click propagation stopped (#4430)

This commit is contained in:
M. Palanikannan 2024-05-10 16:41:13 +05:30 committed by GitHub
parent b725c69882
commit 2d1201cc92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -315,7 +315,10 @@ const CommandList = ({ items, command }: { items: CommandItemProps[]; command: a
"bg-custom-background-80": index === selectedIndex,
}
)}
onClick={() => selectItem(index)}
onClick={(e) => {
e.stopPropagation();
selectItem(index);
}}
>
<span className="grid place-items-center flex-shrink-0">{item.icon}</span>
<p className="flex-grow truncate">{item.title}</p>