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