revdev-components 0.102.0 → 0.104.0

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.
Files changed (2) hide show
  1. package/build/index.js +19 -4
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -4791,10 +4791,23 @@ function AppForm(_a) {
4791
4791
  var _b = React.useState(false), valid = _b[0], setValid = _b[1];
4792
4792
  var _c = useFormValues(), values = _c[0], setValues = _c[1];
4793
4793
  React.useEffect(function () {
4794
+ if (debug) {
4795
+ console.info("%cform", CONSOLE_COLOR, "validation", "called");
4796
+ }
4794
4797
  form
4795
- .validateFields({ validateOnly: true })
4796
- .then(function () { return setValid(true); })
4797
- .catch(function () { return setValid(false); });
4798
+ .validateFields({ validateOnly: true, dirty: true })
4799
+ .then(function () {
4800
+ if (debug) {
4801
+ console.info("%cform", CONSOLE_COLOR, "validation", "valid");
4802
+ }
4803
+ setValid(true);
4804
+ })
4805
+ .catch(function () {
4806
+ if (debug) {
4807
+ console.info("%cform", CONSOLE_COLOR, "validation", "not valid");
4808
+ }
4809
+ setValid(false);
4810
+ });
4798
4811
  }, [form, values]);
4799
4812
  React.useEffect(function () {
4800
4813
  if (debug) {
@@ -4803,7 +4816,9 @@ function AppForm(_a) {
4803
4816
  onValid === null || onValid === void 0 ? void 0 : onValid(valid);
4804
4817
  }, [onValid, valid]);
4805
4818
  React.useEffect(function () {
4806
- console.info("%cform", CONSOLE_COLOR, "values", values);
4819
+ if (debug) {
4820
+ console.info("%cform", CONSOLE_COLOR, "values", values);
4821
+ }
4807
4822
  }, [values]);
4808
4823
  var handleValuesChange = React.useCallback(function (changedValues, values) {
4809
4824
  setValues(changedValues, values);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev-components",
3
- "version": "0.102.0",
3
+ "version": "0.104.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {