@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 CHANGED
@@ -1,5 +1,23 @@
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
+
15
+ ## 2.6.1
16
+
17
+ ### Patch Changes
18
+
19
+ - b110d4a: Fixed select field not accepting multiple prop
20
+
3
21
  ## 2.6.0
4
22
 
5
23
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -174,7 +174,7 @@ declare const TextareaField: React$1.FC<Omit<src.BaseFieldProps<react_hook_form.
174
174
  interface SwitchFieldProps extends SwitchProps {
175
175
  }
176
176
  declare const SwitchField: React$1.FC<Omit<src.BaseFieldProps<react_hook_form.FieldValues, string>, keyof SwitchFieldProps> & SwitchFieldProps>;
177
- interface SelectFieldProps extends SelectProps {
177
+ interface SelectFieldProps extends SelectProps<boolean> {
178
178
  buttonProps?: SelectButtonProps;
179
179
  listProps?: SelectListProps;
180
180
  }
package/dist/index.d.ts CHANGED
@@ -174,7 +174,7 @@ declare const TextareaField: React$1.FC<Omit<src.BaseFieldProps<react_hook_form.
174
174
  interface SwitchFieldProps extends SwitchProps {
175
175
  }
176
176
  declare const SwitchField: React$1.FC<Omit<src.BaseFieldProps<react_hook_form.FieldValues, string>, keyof SwitchFieldProps> & SwitchFieldProps>;
177
- interface SelectFieldProps extends SelectProps {
177
+ interface SelectFieldProps extends SelectProps<boolean> {
178
178
  buttonProps?: SelectButtonProps;
179
179
  listProps?: SelectListProps;
180
180
  }
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,