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

remove onChange prop again before spreading to react-simple-code-editor #262

Merged
merged 1 commit into from Jun 27, 2021

Conversation

jpdriver
Copy link
Contributor

  • squashes a bug inadvertently introduced when Move LiveProvider to hooks, fixes #220 #226 was merged

    • previously we were removing onChange (and a few other props) before spreading the ...rest remainder down to react-simple-code-editor
  • onChange gets called with a SyntheticEvent (instead of a value) and that in turns throws a bunch of other errors

  • as a fix i considered removing the props spread entirely and just being more explicit, but it seems like this was originally introduced to (optionally) support spreading handlers like onFocus and onBlur down to the editor (see Enable rest props to pass to editor #6)

    • in the interest of not interfering with event handler spreading, I've just restored the behaviour prior to Move LiveProvider to hooks, fixes #220 #226 which was just to swallow onChange in the destructuring as an unused var

Before

Screen.Recording.2021-06-27.at.12.22.37.pm.mov

After

Screen.Recording.2021-06-27.at.12.23.25.pm.mov

@jpdriver jpdriver merged commit 5478430 into master Jun 27, 2021
@jpdriver jpdriver deleted the jp-fix-custom-onchange branch June 27, 2021 21:50
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.

None yet

1 participant