I am using React open source component Downshift to build my custom dropdown.
The problem I am facing is that Downshift clears selected item (and calls the onChange
callback with null
) when user presses Escape
key.
This clears my dropdown even though my dropdown does even not have an empty option.
How can I suppress this behavior and make it just close the opened dropdown (if it is open) and not to change the value.