Skip to content

Commit 4ab0f39

Browse files
authored
Convert LayoutGridField to function components (rjsf-team#4807)
* fix typo * LayoutGridField: extract static members * LayoutGridField: all function components * Improve types/inline docs * Wrap `onFieldChange` in `useCallback` * Fix parallel build issue caused by core/snapshot-tests dependency cycle * Fix tests * Add to CHANGELOG * onFieldChange is actually unnecessary * reviewer feedback LayoutGridField: - Deep compare memoize the fieldPathId - Move helper functions in LayoutGridField - Update docs comments in LayoutGridField - Attach TEST_IDS to LayoutGridField function Additionally: - Update migration guide per rjsf-team#4808 * reviewer feedback - Move LayoutGridFieldChildren component definition above usage - LayoutGridFieldComponent": Simplify props destructure - Fix issue with the nx dependency graph - dependencies were not tracked
1 parent adeb182 commit 4ab0f39

File tree

6 files changed

+725
-724
lines changed

6 files changed

+725
-724
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ should change the heading of the (upcoming) version to include a major version b
4444
- BREAKING CHANGE: Updated `ArrayFieldTemplate` to remove the `ArrayFieldItemTemplate` render in favor of simply using `items` due to `ArrayField` changes
4545
- BREAKING CHANGE: Updated `ArrayFieldItemButtonsTemplate` to replace the old callback-generator functions with the new memoizable callback functions
4646
- Fixed a bug in `Form` to avoid getting errors being reported at the root level via `onChange` when there aren't
47+
- Refactored LayoutGridField as function components instead of a single class component.
4748

4849
## @rjsf/daisyui
4950

@@ -126,6 +127,8 @@ should change the heading of the (upcoming) version to include a major version b
126127
- Updated the `utility-functions.md` documentation to add the new `useDeepCompareMemo()` hook
127128
- Updated the `v6.x upgrade guide.md` documentation to add the BREAKING CHANGES to the `ArrayFieldTemplateProps`, `ArrayFieldItemTemplateType`, `ArrayFieldItemButtonsTemplateType`, `FieldTemplateProps`, `ObjectFieldTemplateProps` and `WrapIfAdditionalTemplateProps` interface props changes and the `useDeepCompareMemo()` hook
128129
- Added documentation for the `nameGenerator` prop in `form-props.md` and v6.x upgrade guide
130+
- Updated '@rjsf/snapshot-tests' package to explicitly depend on '@rjsf/core' to build first, fixing an error with parallelized builds
131+
129132

130133
# 6.0.0-beta.21
131134

nx.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@
22
"extends": "nx/presets/npm.json",
33
"targetDefaults": {
44
"build": {
5-
"dependsOn": [
6-
{
7-
"//": "use only dependencies to avoid cycle @rjsf/core:build --> @rjsf/snapshot-tests:build --> @rjsf/core:build",
8-
"projects": "dependencies",
9-
"target": "^build"
10-
}
11-
],
5+
"dependsOn": ["^build"],
126
"cache": true
137
},
148
"cs-check": {

0 commit comments

Comments
 (0)