pacocoursey / cmdk

Fast, unstyled command menu React component.
https://cmdk.paco.me
MIT License
9.98k stars 287 forks source link

Unable to access event to stop propagation #313

Open minedun6 opened 1 month ago

minedun6 commented 1 month ago

I have a clickable row which contains a menu with the command as presented in the screenshot below. Screenshot from 2024-10-14 16-51-28

The problem is that I'm trying to stop the command event from bubbeling up to the row. But I can't seem to find any documentation which can help with the following. Can I get some help please :)

Have a nice day !

smhayhan commented 2 weeks ago

you can stop propagation on onMouseDown event.

onMouseDown={e => {
  e.preventDefault()
  e.stopPropagation()
}}