aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/editable-label.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-06-29 02:34:30 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-06-29 02:34:30 +0800
commita69882df720afd47fda4f238a77d97c81aaa0cdf (patch)
tree121cb5f8981eb5fc9d60c4bafd64f109ccda1c72 /ui/app/components/editable-label.js
parent86a1eaadf188b0879ae41a5fa125649ad51f0118 (diff)
downloadtangerine-wallet-browser-a69882df720afd47fda4f238a77d97c81aaa0cdf.tar
tangerine-wallet-browser-a69882df720afd47fda4f238a77d97c81aaa0cdf.tar.gz
tangerine-wallet-browser-a69882df720afd47fda4f238a77d97c81aaa0cdf.tar.bz2
tangerine-wallet-browser-a69882df720afd47fda4f238a77d97c81aaa0cdf.tar.lz
tangerine-wallet-browser-a69882df720afd47fda4f238a77d97c81aaa0cdf.tar.xz
tangerine-wallet-browser-a69882df720afd47fda4f238a77d97c81aaa0cdf.tar.zst
tangerine-wallet-browser-a69882df720afd47fda4f238a77d97c81aaa0cdf.zip
Additional length check just in case.
Diffstat (limited to 'ui/app/components/editable-label.js')
-rw-r--r--ui/app/components/editable-label.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/app/components/editable-label.js b/ui/app/components/editable-label.js
index 6b3e8cb28..34fd7e3e0 100644
--- a/ui/app/components/editable-label.js
+++ b/ui/app/components/editable-label.js
@@ -45,6 +45,7 @@ EditableLabel.prototype.saveIfEnter = function (event) {
EditableLabel.prototype.saveText = function () {
var container = findDOMNode(this)
var text = container.querySelector('.editable-label input').value
- this.props.saveText(text)
- this.setState({ isEditingLabel: false, textLabel: text })
+ var truncatedText = text.substring(0,30)
+ this.props.saveText(truncatedText)
+ this.setState({ isEditingLabel: false, textLabel: truncatedText })
}