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
+4
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,9 @@ should change the heading of the (upcoming) version to include a major version b
114
114
- BREAKING CHANGE: Removed the deprecated `RJSF_ADDITONAL_PROPERTIES_FLAG` constant
115
115
- Updated the `WrapIfAdditionalTemplateProps` to include `hideError` and `rawErrors` in support of moving `Bootstrap 3` marker classes out of `SchemaField`
116
116
- Added support for `patternProperties`[#1944](https://github.com/rjsf-team/react-jsonschema-form/issues/1944)
117
+
- Updated `getTemplate()` to allow per-field customization using string key from `Registry`, fixing [#3695](https://github.com/rjsf-team/react-jsonschema-form/issues/3695).
118
+
- Updated `TemplatesType` to allow for a string key to be used to reference a custom template in the `Registry`, fixing [#3695](https://github.com/rjsf-team/react-jsonschema-form/issues/3695)
119
+
- Updated tests to cover the new `getTemplate()` functionality
117
120
118
121
## @rjsf/validator-ajv6
119
122
@@ -134,6 +137,7 @@ should change the heading of the (upcoming) version to include a major version b
134
137
- Replaced Lerna with Nx, updated all lerna commands to use the Nx CLI
135
138
- BREAKING CHANGE: Updated all `peerDependencies` to change minimal `React` support to `>=18`
136
139
- Added documentation and playground example for `patternProperties`
140
+
- Updated `advanced-customization/custom-templates` with the new feature.
Please see the [customArray.tsx sample](https://github.com/rjsf-team/react-jsonschema-form/blob/main/packages/playground/src/samples/customArray.tsx) from the [playground](https://rjsf-team.github.io/react-jsonschema-form/) for another example.
92
103
93
104
The following props are passed to each `ArrayFieldTemplate`:
@@ -165,16 +176,27 @@ render(
165
176
);
166
177
```
167
178
168
-
You also can provide your own template to a uiSchema by specifying a `ui:ArrayFieldDescriptionTemplate` property.
179
+
You also can provide your own field template to a uiSchema by specifying a `ui:ArrayFieldDescriptionTemplate` property with your Component :
Please see the [customObject.tsx sample](https://github.com/rjsf-team/react-jsonschema-form/blob/main/packages/playground/src/samples/customObject.tsx) from the [playground](https://rjsf-team.github.io/react-jsonschema-form/) for a better example.
803
858
804
859
The following props are passed to each `ObjectFieldTemplate` as defined by the `ObjectFieldTemplateProps` in `@rjsf/utils`:
@@ -1145,3 +1200,20 @@ The following prop is passed to a `SubmitButton`:
1145
1200
1146
1201
-`uiSchema`: The uiSchema object for this field, used to extract the `UISchemaSubmitButtonOptions`.
1147
1202
-`registry`: The `registry` object.
1203
+
1204
+
## Custom Templates
1205
+
1206
+
You can now add custom components to the registry and reference them in your `uiSchema` using string keys.
0 commit comments