-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Programmatic field clearing does not work correctly #176
Comments
@RomanChumakov Can you provide a reproducible example? |
I created a simple example using creat-react-app here: https://github.com/RomanChumakov/react-md-editor-bug-demonstration simplescreenrecorder-2021-05-28_14.32.13.mp4 |
jaywcjlove
added a commit
that referenced
this issue
May 28, 2021
<MDEditor
className = "product-md-editor"
onChange = {value => formik.setFieldValue('text', value)}
- value = {formik.values.text}
+ value = {formik.values.text || ''}
/> |
Or, Upgrade |
@jaywcjlove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
I found that when setting the md-editor value programmatically, md-editor appears to be half-cleared. The Markdown is cleared immediately. But the Textarea is not cleared until I switch to the preview mode and then back to previous mode.
It looks like the Textarea is not updated when the value is changed directly, until it is refreshed by changing mode.
The text was updated successfully, but these errors were encountered: