Appease the linter
This checks `onValidate` in `render` to make the linter happy.
This commit is contained in:
parent
b8925d857d
commit
7241418eba
1 changed files with 7 additions and 4 deletions
|
@ -95,10 +95,13 @@ export default class Field extends React.PureComponent {
|
|||
prefixContainer = <span className="mx_Field_prefix">{prefix}</span>;
|
||||
}
|
||||
|
||||
const validClass = classNames({
|
||||
mx_Field_valid: this.state.valid === true,
|
||||
mx_Field_invalid: this.state.valid === false,
|
||||
});
|
||||
let validClass;
|
||||
if (onValidate) {
|
||||
validClass = classNames({
|
||||
mx_Field_valid: this.state.valid === true,
|
||||
mx_Field_invalid: this.state.valid === false,
|
||||
});
|
||||
}
|
||||
|
||||
const fieldClasses = classNames("mx_Field", `mx_Field_${inputElement}`, {
|
||||
// If we have a prefix element, leave the label always at the top left and
|
||||
|
|
Loading…
Reference in a new issue