You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we have some items that are links, whats the recommended approach to support middle clicking? i could imagine onSelect handler passing the event
The text was updated successfully, but these errors were encountered:
tarngerine
changed the title
Support for middle clicking an item to open in new tab
Support for middle/cmd clicking an item to open in new tab
Jul 10, 2023
@joaom00 thanks for chiming in, but this doesnt support the standard onSelect keyboard behavior (navigate on return)
best way i'm hacking it is to add an anchor tag inside, but also keep onSelect on the CommandItem. however, the anchor tag needs to have its own click handler that e.stopPropagation to prevent double firing (in the case where you have side effects from onSelect, which I do)
Ohh I see, yeah I think your approach is the way to go for now. I guess if #138 gets merged you will be able to have the desired behavior. Would be like this:
we have some items that are links, whats the recommended approach to support middle clicking? i could imagine onSelect handler passing the event
The text was updated successfully, but these errors were encountered: