|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## v6.0.1 (2025-12-04) |
| 4 | + |
| 5 | +- deps: upgrade dependencies |
| 6 | + |
3 | 7 | ## v6.0.0 (2025-11-21) |
4 | 8 |
|
5 | 9 | ### Breaking changes |
|
13 | 17 | - refactor: rename type `ModifiedFields` to `ModifiedState` |
14 | 18 | - refactor: rename type `TouchedFields` to `TouchedState` |
15 | 19 | - refactor: rename `useFieldArray().fields` to `items` |
16 | | -- refactor: forms can be submitted if not modified by default (use option `disableSubmitIfNotModified` to change this) |
| 20 | +- refactor: forms can be submitted if not modified by default (use option |
| 21 | + `disableSubmitIfNotModified` to change this) |
17 | 22 | - refactor: `setValues()` does not accept a function anymore in `useForm()` |
18 | 23 | - refactor: add function `initialize()` to `useForm()` and make `setInitialValues()` do what it says |
19 | | -- refactor: remove props `emptyOptionLabel`, `options` and `type` from `Field` component to only handle props initialization |
| 24 | +- refactor: remove props `emptyOptionLabel`, `options` and `type` from `Field` component to only |
| 25 | + handle props initialization |
20 | 26 | - refactor: rename mode `experimental_uncontrolled` to `uncontrolled` |
21 | | -- refactor: rename option `parser` to `parse` in `useForm().getFieldProps()`, `useForm().handleFieldChange()`, `useForm().handleSetValue()` and `getFieldValue()` |
| 27 | +- refactor: rename option `parser` to `parse` in `useForm().getFieldProps()`, |
| 28 | + `useForm().handleFieldChange()`, `useForm().handleSetValue()` and `getFieldValue()` |
22 | 29 | - refactor: rename `handleBlur()` to `handleFieldBlur()` in `useForm()` |
23 | 30 |
|
24 | 31 | ### Other changes |
|
54 | 61 | - feat: add option `sort` to `useFieldArray()` |
55 | 62 | - feat: add option `format` to `getFieldProps()` in `useForm()` |
56 | 63 | - feat: add option `replaceNull` to `getFieldProps()` in `useForm()` |
57 | | -- feat: add option `setValueOptions` to `getFieldProps()`, `handleFieldChange()` and `handleSetValue()` in `useForm()` |
| 64 | +- feat: add option `setValueOptions` to `getFieldProps()`, `handleFieldChange()` and |
| 65 | + `handleSetValue()` in `useForm()` |
58 | 66 | - feat: add hook `useWatch(path, callback)` |
59 | 67 | - feat: return `id` from `useForm()` |
60 | 68 | - feat: make `onSubmit` optional in `useForm()` |
61 | 69 | - feat: pass `values` as second argument of `onSubmitted(result, values)` |
62 | 70 | - feat: set `key` attribute on `<Field>` component using `useForm().key()` |
63 | 71 | - feat: improve autocompletion of field names in functions arguments |
64 | | -- feat: pass current items to callback of `handleAppend()` and `handlePrepend()` of `useFieldArray()` |
| 72 | +- feat: pass current items to callback of `handleAppend()` and `handlePrepend()` of |
| 73 | + `useFieldArray()` |
65 | 74 | - feat: use `parse` option of `getFieldProps` to parse array values |
66 | 75 | - fix: return `onClick` property in `getButtonProps()` in `useForm()` |
67 | 76 | - fix: fix errors state after changing array items (insert, prepend, remove...) |
68 | | -- fix: fix value returned by `getFieldProps()` to be empty string instead of null when format option is not null |
| 77 | +- fix: fix value returned by `getFieldProps()` to be empty string instead of null when format option |
| 78 | + is not null |
69 | 79 | - fix: export types from index to simplify import declarations |
70 | 80 | - fix: do not mark form as validated when `validateFields()` was successful |
71 | 81 | - fix: fix lost of modified state after using `appendListItem()` |
72 | 82 | - fix: fix "undefined path error" when field onBlur is called |
73 | | -- fix: include value in field id for checkbox and radio elements so the focus is working when clicking on them |
| 83 | +- fix: include value in field id for checkbox and radio elements so the focus is working when |
| 84 | + clicking on them |
74 | 85 | - fix: replace field's null value with empty string in controlled mode |
75 | 86 | - fix: fix checked state of radio/checkbox with empty string as value and context value is null |
76 | 87 | - fix: update fields to validate instead of replacing them when setting values |
|
0 commit comments