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 7200ab8 commit fa220db
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 fa220db

Please sign in to comment.