Bluring input on escape key

This commit is contained in:
Piotr Janosz
2019-08-06 15:15:56 +02:00
committed by fabioberger
parent 59211c1c1e
commit 11cff4d391

View File

@@ -52,6 +52,7 @@ const CustomAutoComplete: React.FC<IAutoCompleteProps> = ({
const handleKeyUp: any = (event: React.KeyboardEvent): void => {
if (event.key === 'Escape') {
setValue('');
inputRef.blur();
}
};