Bluring input on escape key
This commit is contained in:
committed by
fabioberger
parent
59211c1c1e
commit
11cff4d391
@@ -52,6 +52,7 @@ const CustomAutoComplete: React.FC<IAutoCompleteProps> = ({
|
||||
const handleKeyUp: any = (event: React.KeyboardEvent): void => {
|
||||
if (event.key === 'Escape') {
|
||||
setValue('');
|
||||
inputRef.blur();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user