Skip to content

Commit d8ebfc9

Browse files
authored
Checkbox - bind functions (#2794)
1 parent 6ed014a commit d8ebfc9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/checkbox/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,16 +298,16 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
298298
);
299299
}
300300

301-
validate() {
301+
validate = () => {
302302
const {value, required} = this.props;
303303
const error = required && !value;
304304
this.validationState = true;
305305
this.setState({showError: error, isValid: !error});
306-
}
306+
};
307307

308-
isValid() {
308+
isValid = () => {
309309
return this.state.isValid;
310-
}
310+
};
311311
}
312312

313313
function createStyles(props: CheckboxProps) {

0 commit comments

Comments
 (0)