Fix hiding price input when free is checked on publish form

This commit is contained in:
6ea86b96 2017-07-18 13:45:00 +07:00
parent c5c7dbbdee
commit 95c5ddbfda
No known key found for this signature in database
GPG key ID: B282D183E4931E8F

View file

@ -42,6 +42,7 @@ class PublishForm extends React.PureComponent {
submitting: false, submitting: false,
creatingChannel: false, creatingChannel: false,
modal: null, modal: null,
isFee: false,
}; };
} }
@ -635,11 +636,8 @@ class PublishForm extends React.PureComponent {
label={__("Free")} label={__("Free")}
type="radio" type="radio"
name="isFree" name="isFree"
value="1" onChange={() => this.handleFeePrefChange(false)}
onChange={() => { checked={!this.state.isFee}
this.handleFeePrefChange(false);
}}
defaultChecked={!this.state.isFee}
/> />
<FormField <FormField
type="radio" type="radio"
@ -648,7 +646,7 @@ class PublishForm extends React.PureComponent {
onChange={() => { onChange={() => {
this.handleFeePrefChange(true); this.handleFeePrefChange(true);
}} }}
defaultChecked={this.state.isFee} checked={this.state.isFee}
/> />
<span className={!this.state.isFee ? "hidden" : ""}> <span className={!this.state.isFee ? "hidden" : ""}>
<FormField <FormField