From aea1c7e6ee8379649d717af2ef9f51e51ba5d7f9 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Fri, 18 Nov 2016 03:49:16 -0500 Subject: [PATCH] Convert name field into controlled component --- js/page/publish.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/page/publish.js b/js/page/publish.js index 12dc29a9c..a8932a813 100644 --- a/js/page/publish.js +++ b/js/page/publish.js @@ -111,6 +111,7 @@ var PublishPage = React.createClass({ this._tempFilePath = null; return { + rawName: '', name: '', bid: '', feeAmount: '', @@ -152,6 +153,7 @@ var PublishPage = React.createClass({ if (!rawName) { this.setState({ + rawName: '', name: '', nameResolved: false, }); @@ -159,6 +161,10 @@ var PublishPage = React.createClass({ return; } + this.setState({ + rawName: rawName, + }); + var name = lbry.formatName(rawName); lbry.resolveName(name, (info) => { @@ -340,7 +346,7 @@ var PublishPage = React.createClass({

LBRY Name

- lbry:// + lbry:// { (!this.state.name ? '' : (! this.state.nameResolved ? The name {this.state.name} is available.