@saas-ui/forms 2.6.0 → 2.6.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +18 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- 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/default-fields.tsx +1 -1
- package/src/number-input/number-input.test.tsx +3 -1
- package/src/select/select.test.tsx +4 -2
package/dist/index.mjs
CHANGED
@@ -530,7 +530,8 @@ var useBaseField = (props) => {
|
|
530
530
|
};
|
531
531
|
var BaseField = (props) => {
|
532
532
|
const { controlProps, label, help, hideLabel, error } = useBaseField(props);
|
533
|
-
|
533
|
+
const isInvalid = !!error || controlProps.isInvalid;
|
534
|
+
return /* @__PURE__ */ jsxs5(FormControl2, { ...controlProps, isInvalid, children: [
|
534
535
|
label && !hideLabel ? /* @__PURE__ */ jsx10(FormLabel2, { children: label }) : null,
|
535
536
|
/* @__PURE__ */ jsxs5(Box, { children: [
|
536
537
|
props.children,
|