@ultraviolet/form 2.8.7 → 2.8.8

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.
@@ -57,7 +57,7 @@ const NumberInputFieldV2 = ({
57
57
  },
58
58
  onChange: newValue => {
59
59
  // React hook form doesnt allow undefined values after definition https://react-hook-form.com/docs/usecontroller/controller (that make sense)
60
- field.onChange(newValue ?? null);
60
+ field.onChange(newValue);
61
61
  onChange?.(newValue);
62
62
  },
63
63
  max: max,
@@ -81,7 +81,8 @@ const NumberInputFieldV2 = ({
81
81
  unit: unit,
82
82
  "aria-label": ariaLabel,
83
83
  autoFocus: autoFocus,
84
- readOnly: readOnly
84
+ readOnly: readOnly,
85
+ required: required
85
86
  });
86
87
  };
87
88
 
package/dist/index.d.ts CHANGED
@@ -492,7 +492,7 @@ type Options$1<TFieldValues extends FieldValues> = {
492
492
  * }
493
493
  * ```
494
494
  */
495
- declare const useFieldDeprecated: <T, TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(name: TFieldName, options?: Options$1<TFieldValues> | undefined) => {
495
+ declare const useFieldDeprecated: <T, TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(name: TFieldName, options?: Options$1<TFieldValues>) => {
496
496
  input: {
497
497
  value: T;
498
498
  onChange: (...event: any[]) => void;
@@ -534,7 +534,7 @@ type Options<TFieldValues extends FieldValues> = {
534
534
  /**
535
535
  * @deprecated Use [useFieldArray](https://www.react-hook-form.com/api/usefieldarray/)
536
536
  */
537
- declare const useFieldArrayDeprecated: <T, TFieldValues extends FieldValues = FieldValues>(name: ArrayPath<TFieldValues>, options?: Options<TFieldValues> | undefined) => {
537
+ declare const useFieldArrayDeprecated: <T, TFieldValues extends FieldValues = FieldValues>(name: ArrayPath<TFieldValues>, options?: Options<TFieldValues>) => {
538
538
  fields: {
539
539
  push: react_hook_form.UseFieldArrayAppend<TFieldValues, ArrayPath<TFieldValues>>;
540
540
  value: T[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/form",
3
- "version": "2.8.7",
3
+ "version": "2.8.8",
4
4
  "description": "Ultraviolet Form",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -36,7 +36,7 @@
36
36
  "@emotion/styled": "11.11.0",
37
37
  "react": "18.x",
38
38
  "react-dom": "18.x",
39
- "react-hook-form": "7.51.0"
39
+ "react-hook-form": "7.51.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@babel/core": "7.24.0",
@@ -52,8 +52,8 @@
52
52
  "@emotion/react": "11.11.4",
53
53
  "@emotion/styled": "11.11.0",
54
54
  "react-select": "5.8.0",
55
- "react-hook-form": "7.51.0",
56
- "@ultraviolet/ui": "1.43.1"
55
+ "react-hook-form": "7.51.1",
56
+ "@ultraviolet/ui": "1.43.2"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "rollup -c ../../rollup.config.mjs",