@ultraviolet/form 3.9.0 → 3.9.1

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.
@@ -36,6 +36,9 @@ const CheckboxGroupField = ({
36
36
  }
37
37
  return null;
38
38
  })?.filter(Boolean) ?? [];
39
+ if (requiredChildren.length === 0 && !required) {
40
+ return true;
41
+ }
39
42
  if (!required && arraysContainSameValues(value, requiredChildren)) {
40
43
  return true;
41
44
  }
@@ -70,7 +73,7 @@ const CheckboxGroupField = ({
70
73
  onChange?.(event.currentTarget.value);
71
74
  }, error: getError({
72
75
  label
73
- }, error) ?? customError, name, children });
76
+ }, error) ?? customError, name, required, children });
74
77
  };
75
78
  CheckboxGroupField.Checkbox = ui.CheckboxGroup.Checkbox;
76
79
  exports.CheckboxGroupField = CheckboxGroupField;
@@ -34,6 +34,9 @@ const CheckboxGroupField = ({
34
34
  }
35
35
  return null;
36
36
  })?.filter(Boolean) ?? [];
37
+ if (requiredChildren.length === 0 && !required) {
38
+ return true;
39
+ }
37
40
  if (!required && arraysContainSameValues(value, requiredChildren)) {
38
41
  return true;
39
42
  }
@@ -68,7 +71,7 @@ const CheckboxGroupField = ({
68
71
  onChange?.(event.currentTarget.value);
69
72
  }, error: getError({
70
73
  label
71
- }, error) ?? customError, name, children });
74
+ }, error) ?? customError, name, required, children });
72
75
  };
73
76
  CheckboxGroupField.Checkbox = CheckboxGroup.Checkbox;
74
77
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/form",
3
- "version": "3.9.0",
3
+ "version": "3.9.1",
4
4
  "description": "Ultraviolet Form",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -71,8 +71,8 @@
71
71
  "@babel/runtime": "7.25.6",
72
72
  "react-hook-form": "7.53.0",
73
73
  "react-select": "5.8.1",
74
- "@ultraviolet/themes": "1.14.1",
75
- "@ultraviolet/ui": "1.71.0"
74
+ "@ultraviolet/themes": "1.14.2",
75
+ "@ultraviolet/ui": "1.71.1"
76
76
  },
77
77
  "scripts": {
78
78
  "build:profile": "npx vite-bundle-visualizer -c vite.config.ts",