Skip to content

fix: Call latest onChange #1755

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

Closed
wants to merge 2 commits into from

Conversation

kirkov
Copy link

@kirkov kirkov commented May 16, 2020

Reasons for making this change

Fixes the issue described in #1708

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests
    • I've updated docs if needed
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

Copy link
Member

@epicfaace epicfaace left a comment

Choose a reason for hiding this comment

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

Thanks! Can you add a test, ideally something that exercises exactly the issue described in #1708?

@kirkov kirkov force-pushed the call-next-props-onchange branch from 0930a0b to 9ba4c3a Compare May 25, 2020 17:22
@kirkov
Copy link
Author

kirkov commented May 25, 2020

@epicfaace Added a test. It was I bit tricky to trigger the condition for the onChange to be called. Let me know if you have a better way 👍

@kirkov kirkov closed this Feb 12, 2021
@epicfaace epicfaace reopened this Feb 12, 2021
@epicfaace
Copy link
Member

This is still valid, I just haven't reviewed it yet.

heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this pull request Aug 26, 2022
- Reimplement two fixes related to `onChange` in the new `Form.tsx`
  - rjsf-team#1755 fixes the calling of the proper `onChange` during props update
  - rjsf-team#2460 fixes race condition on calling `onChange` after setState.
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this pull request Aug 26, 2022
- Reimplement two fixes related to `onChange` in the new `Form.tsx`
  - rjsf-team#1755 fixes the calling of the proper `onChange` during props update
  - rjsf-team#2460 fixes race condition on calling `onChange` after setState.
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this pull request Aug 26, 2022
- Reimplement two fixes related to `onChange` in the new `Form.tsx`
  - rjsf-team#1755 fixes the calling of the proper `onChange` during props update
  - rjsf-team#2460 fixes race condition on calling `onChange` after setState.
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this pull request Aug 26, 2022
- Reimplement two fixes related to `onChange` in the new `Form.tsx`
  - rjsf-team#1755 fixes the calling of the proper `onChange` during props update
  - rjsf-team#2460 fixes race condition on calling `onChange` after setState.
heath-freenome added a commit that referenced this pull request Aug 27, 2022
- Reimplement two fixes related to `onChange` in the new `Form.tsx`
  - #1755 fixes the calling of the proper `onChange` during props update
  - #2460 fixes race condition on calling `onChange` after setState.
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this pull request Aug 27, 2022
…sf-team#3052)

- Reimplement two fixes related to `onChange` in the new `Form.tsx`
  - rjsf-team#1755 fixes the calling of the proper `onChange` during props update
  - rjsf-team#2460 fixes race condition on calling `onChange` after setState.
@heath-freenome
Copy link
Member

Reimplemented in v5 beta due to typescript conversion via #3052

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.

3 participants