@flowerforce/flower-react 3.3.3-beta.1 → 3.3.3-beta.3

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/dist/index.cjs.js CHANGED
@@ -443,6 +443,9 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
443
443
  validateFn
444
444
  ]);
445
445
  const onChange = React.useCallback((val) => {
446
+ if (asyncValidate && asyncWaitingError) {
447
+ setCustomAsyncErrors([asyncWaitingError]);
448
+ }
446
449
  dispatch({
447
450
  type: `flower/addDataByPath`,
448
451
  payload: {
@@ -452,7 +455,7 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
452
455
  dirty: defaultValue ? !isEqual(val, defaultValue) : true
453
456
  }
454
457
  });
455
- }, [flowNameFromPath, id, onBlur, dispatch]);
458
+ }, [flowNameFromPath, id, onBlur, dispatch, setCustomAsyncErrors, asyncValidate, asyncWaitingError]);
456
459
  const onBlurInternal = React.useCallback((e) => {
457
460
  setTouched(true);
458
461
  onBlur && onBlur(e);
package/dist/index.esm.js CHANGED
@@ -441,6 +441,9 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
441
441
  validateFn
442
442
  ]);
443
443
  const onChange = useCallback((val) => {
444
+ if (asyncValidate && asyncWaitingError) {
445
+ setCustomAsyncErrors([asyncWaitingError]);
446
+ }
444
447
  dispatch({
445
448
  type: `flower/addDataByPath`,
446
449
  payload: {
@@ -450,7 +453,7 @@ function Wrapper$1({ Component, id, flowName, currentNode, validate, asyncDeboun
450
453
  dirty: defaultValue ? !isEqual(val, defaultValue) : true
451
454
  }
452
455
  });
453
- }, [flowNameFromPath, id, onBlur, dispatch]);
456
+ }, [flowNameFromPath, id, onBlur, dispatch, setCustomAsyncErrors, asyncValidate, asyncWaitingError]);
454
457
  const onBlurInternal = useCallback((e) => {
455
458
  setTouched(true);
456
459
  onBlur && onBlur(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowerforce/flower-react",
3
- "version": "3.3.3-beta.1",
3
+ "version": "3.3.3-beta.3",
4
4
  "description": "FlowerJS components, hooks and utils for React.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,7 +34,7 @@
34
34
  "typescript": "^5.4.5"
35
35
  },
36
36
  "dependencies": {
37
- "@flowerforce/flower-core": "3.2.3-beta.1",
37
+ "@flowerforce/flower-core": "3.2.3-beta.3",
38
38
  "@reduxjs/toolkit": "^2.2.4",
39
39
  "lodash": "^4.17.21",
40
40
  "react-redux": "^9.1.2",