You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,10 +21,12 @@ should change the heading of the (upcoming) version to include a major version b
21
21
22
22
- Updated most of the widgets to get `formContext` from the `registry` instead of the `props` since it will no longer be passed
23
23
- Updated `FieldTemplate`, `ObjectFieldTemplate` and `WrapIfAdditionalTemplate` to rename the old `additionalProperties` interface props to the new ones
24
+
- Updated `BaseInputTemplate`, `CheckboxesWidget`, `CheckboxWidget`, `RadioWidget`, `SelectWidget`, and `TextareaWidget` to use `htmlName` for the HTML `name` attribute
24
25
25
26
## @rjsf/chakra-ui
26
27
27
28
- Updated `FieldTemplate`, `ObjectFieldTemplate` and `WrapIfAdditionalTemplate` to rename the old `additionalProperties` interface props to the new ones
29
+
- Updated `BaseInputTemplate`, `CheckboxesWidget`, `CheckboxWidget`, `RadioWidget`, `SelectWidget`, and `TextareaWidget` to use `htmlName` for the HTML `name` attribute
28
30
29
31
## @rjsf/core
30
32
@@ -33,48 +35,61 @@ should change the heading of the (upcoming) version to include a major version b
33
35
- Updated `ObjectField` to refactor the code from a class component to two stateless functional components, replacing the 3 generator-props with the 4 memoized props mentioned in the `@rjsf/utils` changes
34
36
- Updated `Form` to "memoize" the `fieldPathId` and `registry` into the `FormState`, adding a `toIChangeEvent()` helper to restrict the state returned on the `IChangeEvent` interface callbacks
35
37
- Updated `FieldTemplate`, `ObjectFieldTemplate` and `WrapIfAdditionalTemplate` to rename the old `additionalProperties` interface props to the new ones
38
+
- Added `nameGenerator` prop to `Form` component to enable custom HTML `name` attribute generation for form fields
36
39
37
40
## @rjsf/daisyui
38
41
39
42
- Updated the test mocks to remove `formContext` for the widget mock
40
43
- Updated `FieldTemplate`, `ObjectFieldTemplate` and `WrapIfAdditionalTemplate` to rename the old `additionalProperties` interface props to the new ones
44
+
- Updated `BaseInputTemplate`, `CheckboxesWidget`, `CheckboxWidget`, `RadioWidget`, and `TextareaWidget` to use `htmlName` for the HTML `name` attribute
41
45
42
46
## @rjsf/fluentui-rc
43
47
44
48
- Updated `FieldTemplate`, `ObjectFieldTemplate` and `WrapIfAdditionalTemplate` to rename the old `additionalProperties` interface props to the new ones
49
+
- Updated `BaseInputTemplate`, `CheckboxesWidget`, `CheckboxWidget`, `RadioWidget`, `SelectWidget`, and `TextareaWidget` to use `htmlName` for the HTML `name` attribute
45
50
46
51
## @rjsf/mantine
47
52
48
53
- Updated `FieldTemplate`, `ObjectFieldTemplate` and `WrapIfAdditionalTemplate` to rename the old `additionalProperties` interface props to the new ones
54
+
- Updated `BaseInputTemplate`, `CheckboxesWidget`, `CheckboxWidget`, `RadioWidget`, `SelectWidget`, and `TextareaWidget` to use `htmlName` for the HTML `name` attribute
49
55
50
56
## @rjsf/mui
51
57
52
58
- Updated `BaseInputTemplate` and `SelectWidget` to remove `formContext` from the props
53
59
- Updated `FieldTemplate`, `ObjectFieldTemplate` and `WrapIfAdditionalTemplate` to rename the old `additionalProperties` interface props to the new ones
60
+
- Updated `BaseInputTemplate`, `CheckboxesWidget`, `CheckboxWidget`, `RadioWidget`, `SelectWidget`, and `TextareaWidget` to use `htmlName` for the HTML `name` attribute
54
61
55
62
## @rjsf/primereact
56
63
57
64
- Updated `SelectWidget` to remove `formContext` from the props
58
65
- Updated `FieldTemplate`, `ObjectFieldTemplate` and `WrapIfAdditionalTemplate` to rename the old `additionalProperties` interface props to the new ones
66
+
- Updated `BaseInputTemplate`, `CheckboxesWidget`, `CheckboxWidget`, `RadioWidget`, `SelectWidget`, and `TextareaWidget` to use `htmlName` for the HTML `name` attribute
59
67
60
68
## @rjsf/react-bootstrap
61
69
62
70
- Updated `FieldTemplate`, `ObjectFieldTemplate` and `WrapIfAdditionalTemplate` to rename the old `additionalProperties` interface props to the new ones
71
+
- Updated `BaseInputTemplate`, `CheckboxesWidget`, `CheckboxWidget`, `RadioWidget`, `SelectWidget`, and `TextareaWidget` to use `htmlName` for the HTML `name` attribute
63
72
64
73
## @rjsf/semantic-ui
65
74
66
75
- Updated `FieldTemplate`, `ObjectFieldTemplate` and `WrapIfAdditionalTemplate` to rename the old `additionalProperties` interface props to the new ones
76
+
- Updated `BaseInputTemplate`, `CheckboxesWidget`, `CheckboxWidget`, `RadioWidget`, `SelectWidget`, and `TextareaWidget` to use `htmlName` for the HTML `name` attribute
67
77
68
78
## @rjsf/shadcn
69
79
70
80
- Updated the test mocks to remove `formContext` for the widget mock and added `globalFormOptions` in the registry mock
71
81
- Updated `FieldTemplate`, `ObjectFieldTemplate` and `WrapIfAdditionalTemplate` to rename the old `additionalProperties` interface props to the new ones
82
+
- Updated `BaseInputTemplate`, `CheckboxesWidget`, `CheckboxWidget`, `SelectWidget`, and `TextareaWidget` to use `htmlName` for the HTML `name` attribute (Note: `RadioWidget` does not support `htmlName` due to Radix UI RadioGroup limitations)
72
83
73
84
## @rjsf/utils
74
85
75
86
- BREAKING CHANGE: Updated `FieldTemplateProps` and `WrapIfAdditionalTemplateProps` to replace the `onKeyChange()` and `onDropPropertyClick()` callback generator props with the `onKeyRename()`, `onKeyRenameBlur()` and `onRemoveProperty()` callback props
76
87
- BREAKING CHANGE: Updated `ObjectFieldTemplateProps` to replace the `onAddClick()` callback generator prop with the `onAddProperty()` callback prop
77
88
- Added new hook `useDeepCompareMemo()` and its associated tests
89
+
- Added `NameGeneratorFunction` type and two built-in name generators: `bracketNameGenerator` and `dotNotationNameGenerator`
90
+
- Updated `GlobalFormOptions` type to include optional `nameGenerator` field
91
+
- Updated `toFieldPathId()` function to support name generation via the `nameGenerator` option in `GlobalFormOptions`
92
+
- Added `htmlName` field to `WidgetProps` interface to provide the generated HTML `name` attribute to widgets
78
93
79
94
## Dev / docs / playground
80
95
- Updated the `formTests.tsx` snapshots to add an `anyOf` of all arrays with different item types and removed the disabling of the optional data controls feature for the optional object with oneOfs
@@ -86,6 +101,7 @@ should change the heading of the (upcoming) version to include a major version b
86
101
- Updated the `custom-templates.md` documentation to reflect the `additionalProperties`-based interface props replacement
87
102
- Updated the `utility-functions.mf` documenation to add the new `useDeepCompareMemo()` hook
88
103
- Updated the `v6.x upgrade guide.md` documentation to add the BREAKING CHANGES to the `FieldTemplateProps`, `ObjectFieldTemplateProps` and `WrapIfAdditionalTemplateProps` interface props changes and the `useDeepCompareMemo()` hook
104
+
- Added documentation for the `nameGenerator` prop in `form-props.md` and v6.x upgrade guide
89
105
90
106
# 6.0.0-beta.21
91
107
@@ -209,7 +225,7 @@ should change the heading of the (upcoming) version to include a major version b
209
225
-`ObjectField` and `ArrayField` to use `toFieldPathId` instead of `toIdSchema()` to generate the `fieldPathId`s of all its children
210
226
- Updated the `onChange` handling of fields to make `path` required and either pass it straight through, or use the `fieldPathId.path` instead of using an empty array or appending path information
211
227
- Updated `Form` to use `toFieldPathId()` to generate `fieldPathId` instead of `idSchema`, always providing the `idPrefix` and `idSeparator` in the `globalFormOptions` and make the `path: FieldPathList` required
212
-
- Updated `LayoutGridField` to remove the `IdSchema` related code in favor of `FieldPathId` code
228
+
- Updated `LayoutGridField` to remove the `IdSchema` related code in favor of `FieldPathId` code
213
229
- Also exported the `getTestRegistry()` function from the main `index.ts` to assist developers in creating `registry` object for tests
214
230
- Updated all of the test to deal with the `idSchema` -> `fieldPathId` changes
0 commit comments