Update material UI to 3.3.2 and fix side panel icon sizes
[arvados-workbench2.git] / src / components / autocomplete / autocomplete.tsx
index bc2e60ef2278b8cbab4bf9c7e609fe98b37d3b9a..85704c357ca127ff240ba5a08173166c1c9054e4 100644 (file)
@@ -100,7 +100,7 @@ export class Autocomplete<Value, Suggestion> extends React.Component<Autocomplet
 
     handleKeyPress = ({ key }: React.KeyboardEvent<HTMLInputElement>) => {
         const { onCreate = noop } = this.props;
-        if (key === 'Enter') {
+        if (key === 'Enter' && this.props.value.length > 0) {
             onCreate();
         }
     }