Skip to content

Fix 4819 by modifying the id of the outer FieldComponent render#4823

Merged
heath-freenome merged 1 commit intorjsf-team:mainfrom
heath-freenome:fix-4819
Oct 29, 2025
Merged

Fix 4819 by modifying the id of the outer FieldComponent render#4823
heath-freenome merged 1 commit intorjsf-team:mainfrom
heath-freenome:fix-4819

Conversation

@heath-freenome
Copy link
Copy Markdown
Member

Reasons for making this change

Fixed #4819 by modifying the id for the outer FieldComponent render when a XxxOfField component is also being rendered

  • In @rjsf/core, updated SchemaField to add a new optional property childFieldPathId to the FieldComponent render to prevent duplicate ids
    • Also updated ObjectField and ArrayField to make children use the childFieldPathId if present, falling back to the fieldPathId if not
    • Fixed the places in the XxxOf tests where the new outer id changed the description ids the test was looking for
  • Updated CHANGELOG.md accordingly

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests. I've run npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

Fixed rjsf-team#4819 by modifying the id for the outer `FieldComponent` render when a `XxxOfField` component is also being rendered
- In `@rjsf/core`, updated `SchemaField` to add a new optional property `childFieldPathId` to the `FieldComponent` render to prevent duplicate ids
  - Also updated `ObjectField` and `ArrayField` to make children use the `childFieldPathId` if present, falling back to the `fieldPathId` if not
  - Fixed the places in the `XxxOf` tests where the new outer id changed the `description` ids the test was looking for
- Updated `CHANGELOG.md` accordingly

# Conflicts:
#	CHANGELOG.md
@heath-freenome heath-freenome merged commit 4e8236f into rjsf-team:main Oct 29, 2025
4 checks passed
@heath-freenome heath-freenome deleted the fix-4819 branch October 29, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When using oneof parent fieldset have same id as child fieldset

2 participants