-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
The editor does not get updated when changing its value #4689
Comments
This is a deliberate change. Please see the discussion in #4540 and let us know if you have any questions. Thanks! |
Ok i see. Is there a final recommendation how to handle updates from outside the component if we want to do that? By overwriting editor.children or by adding a key prop to the Slate component or another approach? |
@delijah I've seen recommendations for both |
@jmorganmartin, do you have a code samples of the recommended methods. Both, setting |
I had to resort to setting |
Description
The editor does not get updated when changing its value to something else than what we get in the change handler of slate. In older versions of slate this worked.
Recording
Version 0.71.0 (broken):
Version 0.66.0 (ok):
Sandbox
Version 0.71.0 (broken): https://codesandbox.io/s/slate-does-not-change-its-value-1umkm?file=/src/App.js
Version 0.66.0 (ok): https://codesandbox.io/s/slate-does-change-its-value-bu6w6
Steps
To reproduce the behaviour:
Expectation
We should be able to set the editors value to any value and the editor must render it accordingly.
Environment
The text was updated successfully, but these errors were encountered: