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
Hi, I need to prevent a dropdown menu from closing when Ctrl+Enter is pressed while a dropdown item is focused. However, the menu should close when Enter is pressed, which is working as expected. Can someone provide some input on this?
I tried something like this, passing onKeyDown to getItemProps. But, onKeyDown is not getting triggered at all.
{...getItemProps({key: item.value&&item.value.toString(),
item,
index,onKeyDown: (e)=>{console.log("press on item")if(e.ctrlKey||(e.ctrlKey&&e.key==="Enter")){e.nativeEvent.stopImmediatePropagation();}},onClick: (e)=>{e.nativeEvent.stopImmediatePropagation();},})}
The text was updated successfully, but these errors were encountered:
Hi, I need to prevent a dropdown menu from closing when Ctrl+Enter is pressed while a dropdown item is focused. However, the menu should close when Enter is pressed, which is working as expected. Can someone provide some input on this?
I tried something like this, passing onKeyDown to getItemProps. But, onKeyDown is not getting triggered at all.
The text was updated successfully, but these errors were encountered: