Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Experimental_DefaultFormStateBehavior no longer experimental #3664

Open
heath-freenome opened this issue May 12, 2023 · 2 comments
Open
Labels
breaking change feature Is a feature request utils Related to @rjsf/utils

Comments

@heath-freenome
Copy link
Member

  • Remove experimental prefix and adjust any implementation that is needing improvement that would be a break change otherwise
  • Remove includeUndefinedValues from getDefaultFormState in favor of DefaultFormStateBehavior object
  • Anything else we thing of
@github-actions github-actions bot added the needs triage Initial label given, to be assigned correct labels and assigned label May 12, 2023
@heath-freenome heath-freenome added breaking change feature Is a feature request utils Related to @rjsf/utils and removed needs triage Initial label given, to be assigned correct labels and assigned labels May 12, 2023
@nickgros
Copy link
Contributor

Per #2980, the default behavior should be changed to omit default fields from the formData

@TheRealJon
Copy link
Contributor

One additional compelling reason that the schema defaults should not be used to pre-fill the form:

The JSON schema spec states:

The value of default should validate against the schema in which it resides, but that isn’t required.

Since it's not required that default values validate against the schema, it's currently possible that a form could be generated and pre-filled with invalid values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change feature Is a feature request utils Related to @rjsf/utils
Projects
None yet
Development

No branches or pull requests

3 participants