improve submit label logic

This commit is contained in:
btzr-io 2017-09-04 20:11:59 -06:00 committed by Jeremy Kauffman
parent a28b4b0c87
commit 7766b6db28

View file

@ -235,6 +235,7 @@ class PublishForm extends React.PureComponent {
name: "", name: "",
uri: "", uri: "",
prefillDone: false, prefillDone: false,
mode: "publish",
}); });
return; return;
@ -256,6 +257,7 @@ class PublishForm extends React.PureComponent {
rawName: rawName, rawName: rawName,
name: name, name: name,
prefillDone: false, prefillDone: false,
mode: "publish",
uri, uri,
}); });
@ -385,6 +387,7 @@ class PublishForm extends React.PureComponent {
handleChannelChange(channelName) { handleChannelChange(channelName) {
this.setState({ this.setState({
mode: "publish",
channel: channelName, channel: channelName,
}); });
const nameChanged = () => this.nameChanged(this.state.rawName); const nameChanged = () => this.nameChanged(this.state.rawName);