@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 +12 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/base-field.tsx +3 -1
- package/src/number-input/number-input.test.tsx +3 -1
- package/src/select/select.test.tsx +4 -2
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
|
-
|
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,
|