-
Notifications
You must be signed in to change notification settings - Fork 193
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
Component prop updates are ignored #142
Comments
I ran into this with |
There may be a solution that involves |
@andyrichardson @mhuggins I am a lot shorter on time these days as when I started this project. Codemirror & React APIs are moving to quickly for me to keep atop of for the day-to-day. I am looking for a co-maintainer of this project. Please contact me directly if you are interested. Thank you for understanding. |
Problem is still here 2 years after. |
I've found a way by adding a key on the tag to force reload on props change |
@paztis did you find a solution? Can this be done with useRef in a functional component? |
I add a key to the react component, and the key is equal to the code value. |
Ahhh ok thanks |
@paztis but after type in=> code change => cm re-render => the cursor disappear, how did you solve it? thanks |
Currently, component updates are being ignored
This means that any update to event handlers just straight up don't work.
In this example, regardless of any calls to setValue, whenever a key is pressed, only the first function passed to CodeMirror is called.
Edit: Looks like the issue in this case is due to the way SSR is being detected - I'm trying to use this inside a chrome devtools extension.
Edit 2: Nothing to do with a chrome extension... I've created a PR 👍
The text was updated successfully, but these errors were encountered: