Skip to content

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.

2 participants