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

fix: errorSchema is not correctly updated when inserting or copying array items #3874

Merged
merged 3 commits into from
Oct 6, 2023

Conversation

jordyjordy
Copy link
Contributor

@jordyjordy jordyjordy commented Sep 19, 2023

Reasons for making this change

When swapping or removing array items, the existing errorSchema is correctly updated. However this was not the case when inserting or copying array elements. Inserting array elements is not implementedby the default ArrayItemTemplate, but it is still possible from custom templates.

To test the "insert" functionality I added a custom ArrayItemTemplate to the ArrayField tests. If this is not the way, or if there is a better way to test this please let me know and I can update them.

Checklist

  • I'm adding or updating code
    • I've added and/or updated tests. I've run npm run test:update to update snapshots, if needed.
    • I've updated the changelog with a description of the PR

@heath-freenome
Copy link
Member

heath-freenome commented Oct 5, 2023

@jordyjordy Good fix! Can you resolve the conflicts in CHANGELOG.md by putting this under the # 5.13.1 section?

@jordyjordy
Copy link
Contributor Author

jordyjordy commented Oct 6, 2023

@heath-freenome Because i don't have experience resolving upstream conflicts I rebased a fix branch and cherry picked my commits. That seems to have closed this PR because for a moment there were 0 code changes.

I reopened it and the conflicts should now be resolved

@jordyjordy jordyjordy reopened this Oct 6, 2023
@heath-freenome heath-freenome merged commit 7dd90eb into rjsf-team:main Oct 6, 2023
4 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