Fix hiding new channel fields on publish form

This commit is contained in:
6ea86b96 2017-07-18 13:53:45 +07:00
parent 95c5ddbfda
commit 969bc0bcbe

View file

@ -93,6 +93,7 @@ class ChannelSection extends React.PureComponent {
"This LBC remains yours and the deposit can be undone at any time." "This LBC remains yours and the deposit can be undone at any time."
); );
const channel = this.state.addingChannel ? "new" : this.props.channel;
const { fetchingChannels, channels = [] } = this.props; const { fetchingChannels, channels = [] } = this.props;
let channelContent = []; let channelContent = [];
@ -102,7 +103,7 @@ class ChannelSection extends React.PureComponent {
type="select" type="select"
tabIndex="1" tabIndex="1"
onChange={this.handleChannelChange.bind(this)} onChange={this.handleChannelChange.bind(this)}
value={this.props.channel} value={channel}
> >
<option key="anonymous" value="anonymous"> <option key="anonymous" value="anonymous">
{__("Anonymous")} {__("Anonymous")}
@ -137,9 +138,7 @@ class ChannelSection extends React.PureComponent {
<FormRow <FormRow
label={__("Name")} label={__("Name")}
type="text" type="text"
onChange={event => { onChange={this.handleNewChannelNameChange.bind(this)}
this.handleNewChannelNameChange(event);
}}
value={this.state.newChannelName} value={this.state.newChannelName}
/> />
<FormRow <FormRow