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
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ should change the heading of the (upcoming) version to include a major version b
25
25
26
26
- Updated `MultiSchemaField` and `SchemaField` to properly display `anyOf`/`oneOf` optional data fields by hiding the label and selector control when it is an optional field AND there is no form data
27
27
- Updated `ArrayField`, `BooleanField`, `LayoutMultiSchemaField`, `MultiSchemaField`, `ObjectField`, `SchemaField`, `StringField` and `BaseInputTemplate` to remove `formContext` from the props
28
+
- Added `nameGenerator` prop to `Form` component to enable custom HTML `name` attribute generation for form fields
28
29
29
30
## @rjsf/daisyui
30
31
@@ -42,13 +43,21 @@ should change the heading of the (upcoming) version to include a major version b
42
43
43
44
- Updated the test mocks to remove `formContext` for the widget mock and added `globalFormOptions` in the registry mock
44
45
46
+
## @rjsf/utils
47
+
48
+
- Added `NameGeneratorFunction` type and two built-in name generators: `bracketNameGenerator` and `dotNotationNameGenerator`
49
+
- Updated `GlobalFormOptions` type to include optional `nameGenerator` field
50
+
- Updated `toFieldPathId()` function to support name generation via the `nameGenerator` option in `GlobalFormOptions`
51
+
- Added `htmlName` field to `WidgetProps` interface to provide the generated HTML `name` attribute to widgets
52
+
45
53
## Dev / docs / playground
46
54
- 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
47
55
- Updated the snapshots in all of the themes accordingly
48
56
- Updated the playground to make the same changes as `formTests.tsx` in the `optionalDataControls.ts` sample, moving the `experimental_defaultFormStateBehavior` inside of a `liveSettings` block
49
57
- Updated the `Sample` and `LiveSettings` types to support the `liveSettings` inside of a sample
50
58
- Updated the `Playground`'s `onSampleSelected` callback to merge any `liveSettings` in the sample on top of those already used in the playground
51
59
- Updated the `customFieldAnyOf` sample to switch `IdSchema` to `FieldPathId`
60
+
- Added documentation for the `nameGenerator` prop in `form-props.md` and v6.x upgrade guide
52
61
53
62
# 6.0.0-beta.21
54
63
@@ -172,7 +181,7 @@ should change the heading of the (upcoming) version to include a major version b
172
181
-`ObjectField` and `ArrayField` to use `toFieldPathId` instead of `toIdSchema()` to generate the `fieldPathId`s of all its children
173
182
- 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
174
183
- 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
175
-
- Updated `LayoutGridField` to remove the `IdSchema` related code in favor of `FieldPathId` code
184
+
- Updated `LayoutGridField` to remove the `IdSchema` related code in favor of `FieldPathId` code
176
185
- Also exported the `getTestRegistry()` function from the main `index.ts` to assist developers in creating `registry` object for tests
177
186
- Updated all of the test to deal with the `idSchema` -> `fieldPathId` changes
0 commit comments