@saas-ui/forms 2.6.1 → 2.6.2

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @saas-ui/forms
2
2
 
3
+ ## 2.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 5fb8082: Fixed issue where isInvalid would not be passed down to form control
8
+ - Updated dependencies [5fb8082]
9
+ - Updated dependencies [d94ccec]
10
+ - Updated dependencies [d94ccec]
11
+ - Updated dependencies [06ec4b6]
12
+ - Updated dependencies [1ff54a2]
13
+ - @saas-ui/core@2.5.1
14
+
3
15
  ## 2.6.1
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -578,7 +578,8 @@ var useBaseField = (props) => {
578
578
  };
579
579
  var BaseField = (props) => {
580
580
  const { controlProps, label, help, hideLabel, error } = useBaseField(props);
581
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react12.FormControl, { ...controlProps, isInvalid: !!error, children: [
581
+ const isInvalid = !!error || controlProps.isInvalid;
582
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react12.FormControl, { ...controlProps, isInvalid, children: [
582
583
  label && !hideLabel ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react12.FormLabel, { children: label }) : null,
583
584
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react12.Box, { children: [
584
585
  props.children,