Skip to content

Conversation

@heath-freenome
Copy link
Member

@heath-freenome heath-freenome commented Nov 6, 2025

Reasons for making this change

Feature improvement for FallbackField to support object and array types

  • In @rjsf/utils removed ADDITIONAL_PROPERTY_KEY_REMOVE in favor of moving it to a local core constants.ts file
  • In @rjsf/core added src/components/constants.ts and refactored ADDITIONAL_PROPERTY_KEY_REMOVE and IS_RESET into it
    • Updated Form to get ADDITIONAL_PROPERTY_KEY_REMOVE and IS_RESET from the constants file
    • Updated ObjectField to get ADDITIONAL_PROPERTY_KEY_REMOVE from the constants file
    • Updated FallbackField to add object support (via additional properties) and array support
    • Updated ArrayField to handle missing items differently when the fallback field feature is on so that clicking the add button presents the fallback field UI
  • Updated the 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
fallback.mov

Feature improvement for `FallbackField` to support object and array types
- In `@rjsf/utils` removed `ADDITIONAL_PROPERTY_KEY_REMOVE` in favor of moving it to a local `core` `constants.ts` file
- In `@rjsf/core` added `src/components/constants.ts` and refactored `ADDITIONAL_PROPERTY_KEY_REMOVE` and `IS_RESET` into it
  - Updated `Form` to get `ADDITIONAL_PROPERTY_KEY_REMOVE` and `IS_RESET` from the constants file
  - Updated `ObjectField` to get `ADDITIONAL_PROPERTY_KEY_REMOVE` from the constants file
  - Updated `FallbackField` to add `object` support (via additional properties) and `array` support
  - Updated `ArrayField` to handle missing `items` differently when the fallback field feature is on so that clicking the add button presents the fallback field UI
- Updated the `CHANGELOG.md` accordingly
* utility.
*/
export const ADDITIONAL_PROPERTY_FLAG = '__additional_property';
export const ADDITIONAL_PROPERTY_KEY_REMOVE = Symbol('remove-this-key');
Copy link
Member Author

@heath-freenome heath-freenome Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this so that if someone just updated core they wouldn't have an issue with a missing constant

@nickgros nickgros merged commit f1640b5 into rjsf-team:main Nov 7, 2025
5 checks passed
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.

2 participants