From 95c5ddbfda155d0e87678418622a51429f974ed5 Mon Sep 17 00:00:00 2001 From: 6ea86b96 <6ea86b96@gmail.com> Date: Tue, 18 Jul 2017 13:45:00 +0700 Subject: [PATCH 1/3] Fix hiding price input when free is checked on publish form --- ui/js/component/publishForm/view.jsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ui/js/component/publishForm/view.jsx b/ui/js/component/publishForm/view.jsx index da6e6eb39..4d765e6d6 100644 --- a/ui/js/component/publishForm/view.jsx +++ b/ui/js/component/publishForm/view.jsx @@ -42,6 +42,7 @@ class PublishForm extends React.PureComponent { submitting: false, creatingChannel: false, modal: null, + isFee: false, }; } @@ -635,11 +636,8 @@ class PublishForm extends React.PureComponent { label={__("Free")} type="radio" name="isFree" - value="1" - onChange={() => { - this.handleFeePrefChange(false); - }} - defaultChecked={!this.state.isFee} + onChange={() => this.handleFeePrefChange(false)} + checked={!this.state.isFee} /> { this.handleFeePrefChange(true); }} - defaultChecked={this.state.isFee} + checked={this.state.isFee} /> Date: Tue, 18 Jul 2017 13:53:45 +0700 Subject: [PATCH 2/3] Fix hiding new channel fields on publish form --- ui/js/component/publishForm/internal/channelSection.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ui/js/component/publishForm/internal/channelSection.jsx b/ui/js/component/publishForm/internal/channelSection.jsx index 6c7802625..76f442af1 100644 --- a/ui/js/component/publishForm/internal/channelSection.jsx +++ b/ui/js/component/publishForm/internal/channelSection.jsx @@ -93,6 +93,7 @@ class ChannelSection extends React.PureComponent { "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; let channelContent = []; @@ -102,7 +103,7 @@ class ChannelSection extends React.PureComponent { type="select" tabIndex="1" onChange={this.handleChannelChange.bind(this)} - value={this.props.channel} + value={channel} >