From 65aefcae6a79ef187acf0d780980916cca812a3c Mon Sep 17 00:00:00 2001 From: Palak Bhojani Date: Tue, 12 Feb 2019 10:01:12 -0800 Subject: [PATCH] Update Editable name to not allow empty string inline edit --- ui/src/shared/components/EditableName.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/src/shared/components/EditableName.tsx b/ui/src/shared/components/EditableName.tsx index e3ed77a94e6..493da6aaa0b 100644 --- a/ui/src/shared/components/EditableName.tsx +++ b/ui/src/shared/components/EditableName.tsx @@ -113,6 +113,10 @@ class EditableName extends Component { const {workingName} = this.state if (e.key === 'Enter') { + if (!workingName) { + this.setState({isEditing: false, workingName: name}) + return + } await onUpdate(workingName) this.setState({isEditing: false}) }