react-native-ui-lib 7.39.1-snapshot.6764 → 7.39.1-snapshot.6771
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -123,7 +123,7 @@ declare class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
123
123
|
getAccessibleHitSlop(size: number): number;
|
|
124
124
|
renderCheckbox(): React.JSX.Element;
|
|
125
125
|
render(): React.JSX.Element;
|
|
126
|
-
validate: () =>
|
|
126
|
+
validate: () => boolean;
|
|
127
127
|
isValid: () => boolean | undefined;
|
|
128
128
|
}
|
|
129
129
|
declare const _default: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<any>>;
|
|
@@ -194,12 +194,13 @@ class Checkbox extends Component {
|
|
|
194
194
|
value,
|
|
195
195
|
required
|
|
196
196
|
} = this.props;
|
|
197
|
-
const
|
|
197
|
+
const isValid = !(required && !value);
|
|
198
198
|
this.validationState = true;
|
|
199
199
|
this.setState({
|
|
200
|
-
showError:
|
|
201
|
-
isValid
|
|
200
|
+
showError: !isValid,
|
|
201
|
+
isValid
|
|
202
202
|
});
|
|
203
|
+
return isValid;
|
|
203
204
|
};
|
|
204
205
|
isValid = () => {
|
|
205
206
|
return this.state.isValid;
|