mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-31 09:21:27 +00:00
Don't render hidden form fields
This commit is contained in:
parent
b73399f4e6
commit
8b13f341b6
1 changed files with 9 additions and 7 deletions
|
@ -62,13 +62,15 @@ var FormField = React.createClass({
|
||||||
delete otherProps.hidden;
|
delete otherProps.hidden;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'form-field-container' + (this.props.hidden ? ' hidden' : '')}>
|
!this.props.hidden
|
||||||
|
? <div className="form-field-container">
|
||||||
<this._element type={this._type} className="form-field" name={this.props.name} ref="field" placeholder={this.props.placeholder}
|
<this._element type={this._type} className="form-field" name={this.props.name} ref="field" placeholder={this.props.placeholder}
|
||||||
{...otherProps}>
|
{...otherProps}>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</this._element>
|
</this._element>
|
||||||
<FormFieldAdvice field={this.refs.field} state={this.state.adviceState}>{this.state.adviceText}</FormFieldAdvice>
|
<FormFieldAdvice field={this.refs.field} state={this.state.adviceState}>{this.state.adviceText}</FormFieldAdvice>
|
||||||
</div>
|
</div>
|
||||||
|
: null
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue