Closed optislav closed 3 years ago
I had this same issue and solved it by intercepting theonKeyPress
event in a styled component wrapper:
<StyledSelectSearchWrapper
onKeyPress={e => {
e.key === 'Enter' && e.preventDefault();
}}
>
<ReactSelectSearch ... />
</StyledSelectSearchWrapper>
Very good library, but I need to select option without submitting a form. Is there way I can replace enter key to space key?