hrm_ui_lib 2.0.0-alpha.23 → 2.0.0-alpha.24

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.
@@ -101,8 +101,11 @@ var FormContainer = function FormContainer(props) {
101
101
  }
102
102
  };
103
103
  useEffect(function () {
104
- if (language) {
105
- trigger();
104
+ if (formState.isSubmitted) {
105
+ var fieldsWithErrors = Object.keys(formState.errors);
106
+ if (fieldsWithErrors.length > 0) {
107
+ trigger(fieldsWithErrors); // only revalidate fields that have errors
108
+ }
106
109
  }
107
110
  }, [language]);
108
111
  return /*#__PURE__*/React.createElement("form", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hrm_ui_lib",
3
- "version": "2.0.0-alpha.23",
3
+ "version": "2.0.0-alpha.24",
4
4
  "description": "UI library for Dino",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",