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

ArraySchemaField should default to the SchemaField from the registry #3131

Closed
1 task done
olzraiti opened this issue Sep 21, 2022 · 2 comments · Fixed by #3136
Closed
1 task done

ArraySchemaField should default to the SchemaField from the registry #3131

olzraiti opened this issue Sep 21, 2022 · 2 comments · Fixed by #3136
Assignees
Labels
awaiting response feature Is a feature request

Comments

@olzraiti
Copy link
Contributor

Prerequisites

What theme are you using?

core

Is your feature request related to a problem? Please describe.

For backward compatibility's sake the new ArraySchemaField should default to the SchemaField from the registry instead of rjsf's implementation of the SchemaField component. Even if backward compatibility wasn't taken into account, in most use cases people probably want to use a single SchemaField implementation regardless of whether it's inside an array or not, so not having to define both of them separately would be easier.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

@olzraiti olzraiti added feature Is a feature request needs triage Initial label given, to be assigned correct labels and assigned labels Sep 21, 2022
@heath-freenome
Copy link
Member

Are you suggesting that we do not define ArraySchemaField in the fields list, but instead look for it and if it does not exist, take the SchemaField instead?

@heath-freenome heath-freenome added awaiting response and removed needs triage Initial label given, to be assigned correct labels and assigned labels Sep 21, 2022
@olzraiti
Copy link
Contributor Author

Yes, that way backward compatibility would remain :)

heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Sep 22, 2022
- Updated `ArrayField` to fallback to `SchemaField` when `ArraySchemaField` was not defined in fields
- Updated the `fields/index.ts` to remove the definition of `ArraySchemaField` and replace it with a comment
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Sep 22, 2022
- Updated `ArrayField` to fallback to `SchemaField` when `ArraySchemaField` was not defined in fields
- Updated the `fields/index.ts` to remove the definition of `ArraySchemaField` and replace it with a comment
- Updated the `custom-widgets-fields.md` file to clarify the `ArraySchemaField` docs based on this improvement
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Sep 22, 2022
- Updated `ArrayField` to fallback to `SchemaField` when `ArraySchemaField` was not defined in fields
  - Updated the test to show that the `SchemaField` fallback is working
- Updated the `fields/index.ts` to remove the definition of `ArraySchemaField` and replace it with a comment
- Updated the `custom-widgets-fields.md` file to clarify the `ArraySchemaField` docs based on this improvement
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Sep 22, 2022
- Updated `ArrayField` to fallback to `SchemaField` when `ArraySchemaField` was not defined in fields
  - Updated the test to show that the `SchemaField` fallback is working
- Updated the `fields/index.ts` to remove the definition of `ArraySchemaField` and replace it with a comment
- Updated the `custom-widgets-fields.md` file to clarify the `ArraySchemaField` docs based on this improvement
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit that referenced this issue Sep 22, 2022
* fix: #3131 ArrayField fallback to SchemaField
- Updated `ArrayField` to fallback to `SchemaField` when `ArraySchemaField` was not defined in fields
  - Updated the test to show that the `SchemaField` fallback is working
- Updated the `fields/index.ts` to remove the definition of `ArraySchemaField` and replace it with a comment
- Updated the `custom-widgets-fields.md` file to clarify the `ArraySchemaField` docs based on this improvement
- Updated the `CHANGELOG.md` accordingly

* - Responded to reviewer feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response feature Is a feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants