Skip to content

Commit

Permalink
Update Editable name to not allow empty string inline edit
Browse files Browse the repository at this point in the history
  • Loading branch information
Palakp41 committed Feb 12, 2019
1 parent 0b890e7 commit 65aefca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/src/shared/components/EditableName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ class EditableName extends Component<Props, State> {
const {workingName} = this.state

if (e.key === 'Enter') {
if (!workingName) {
this.setState({isEditing: false, workingName: name})
return
}
await onUpdate(workingName)
this.setState({isEditing: false})
}
Expand Down

0 comments on commit 65aefca

Please sign in to comment.