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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ui-lib",
3
- "version": "7.39.1-snapshot.6764",
3
+ "version": "7.39.1-snapshot.6771",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -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: () => void;
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 error = required && !value;
197
+ const isValid = !(required && !value);
198
198
  this.validationState = true;
199
199
  this.setState({
200
- showError: error,
201
- isValid: !error
200
+ showError: !isValid,
201
+ isValid
202
202
  });
203
+ return isValid;
203
204
  };
204
205
  isValid = () => {
205
206
  return this.state.isValid;