We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ed014a commit d8ebfc9Copy full SHA for d8ebfc9
src/components/checkbox/index.tsx
@@ -298,16 +298,16 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
298
);
299
}
300
301
- validate() {
+ validate = () => {
302
const {value, required} = this.props;
303
const error = required && !value;
304
this.validationState = true;
305
this.setState({showError: error, isValid: !error});
306
- }
+ };
307
308
- isValid() {
+ isValid = () => {
309
return this.state.isValid;
310
311
312
313
function createStyles(props: CheckboxProps) {
0 commit comments