Skip to content

Commit

Permalink
Merge pull request #11819 from influxdata/fix/inline-edit-empty
Browse files Browse the repository at this point in the history
Update Editable name to not allow empty string inline edit
  • Loading branch information
Palakp41 authored Feb 12, 2019
2 parents 3a9b3a5 + fa220db commit 43cec2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
### Features
1. [11809](https://github.com/influxdata/influxdb/pull/11809): Add the ability to name a scraper target
1. [11821](https://github.com/influxdata/influxdb/pull/11821): Display scraper name as the first and only updatable column in scrapers list
1. [11804](https://github.com/influxdata/influxdb/pull/11804): Add the ability to view runs for a task

### Bug Fixes

1. [11819](https://github.com/influxdata/influxdb/pull/11819): Update the inline edit for resource names to guard for empty strings
### UI Improvements
1. [11764](https://github.com/influxdata/influxdb/pull/11764): Move the download telegraf config button to view config overlay

Expand Down
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 43cec2b

Please sign in to comment.