Closed RomanChumakov closed 3 years ago
@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 I also recorded a video based on this example
<MDEditor
className = "product-md-editor"
onChange = {value => formik.setFieldValue('text', value)}
- value = {formik.values.text}
+ value = {formik.values.text || ''}
/>
@RomanChumakov
@RomanChumakov
Or, Upgrade + @uiw/react-md-editor@3.3.2
@jaywcjlove Thank you for such a quick response!
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.