Code style fix.

feature/default_network_editable
Kevin Serrano 9 years ago
parent 39a758d7c3
commit abcf762184
  1. 4
      ui/app/components/editable-label.js

@ -18,7 +18,7 @@ EditableLabel.prototype.render = function () {
return h('div.editable-label', [ return h('div.editable-label', [
h('input.sizing-input', { h('input.sizing-input', {
defaultValue: props.textValue, defaultValue: props.textValue,
maxLength: "30", maxLength: '30',
onKeyPress: (event) => { onKeyPress: (event) => {
this.saveIfEnter(event) this.saveIfEnter(event)
}, },
@ -45,7 +45,7 @@ EditableLabel.prototype.saveIfEnter = function (event) {
EditableLabel.prototype.saveText = function () { EditableLabel.prototype.saveText = function () {
var container = findDOMNode(this) var container = findDOMNode(this)
var text = container.querySelector('.editable-label input').value var text = container.querySelector('.editable-label input').value
var truncatedText = text.substring(0,30) var truncatedText = text.substring(0, 30)
this.props.saveText(truncatedText) this.props.saveText(truncatedText)
this.setState({ isEditingLabel: false, textLabel: truncatedText }) this.setState({ isEditingLabel: false, textLabel: truncatedText })
} }

Loading…
Cancel
Save