-
Notifications
You must be signed in to change notification settings - Fork 106
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
setState() not changing the "value" props in Editor.render()? #13
Comments
Did you manage to figure this out? I'm stuck at this too. It currently has a shouldComponentUpdate which only updates with changes to htmlElementProps. To make it worked I added a key prop which changes if the value changes since this forces a new component to be generated. Not a great solution but nothing else seemed to work. |
Nah, still waiting to see how he managed that. I'll return to it this afternoon. |
discussed here #3 . |
As discussed there you can get reference of JSONEditor and change state manually, because of breaking functionality. For changing state use #4 (comment) |
Greetings,
In this code, when I change the state of the component with setState(), it does go into the render() method, but does not actually change the display to reflect the new state.
I placed the this.state in the "value" props of the Editor component.
Here's a link to the code: demo-jsoneditor-react
The text was updated successfully, but these errors were encountered: