-
Notifications
You must be signed in to change notification settings - Fork 379
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
RichText not updating properly based on state #666
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
Experiencing the exact same issue, makes it hard to use now. |
I am also experiencing this same issue |
I have some sort of example how to make it work at least (considering there is also another bug with the focus). Yes, I realize this is bad code, but at least something :) Another thing that could fix that is re-creating the component that contains RichText every time by adding a "key" to it (if we are talking about something like a modal dialog for example). Would be happy to hear some feedback from the maintainers/creators of the control.
|
Duplicate: #650 |
The property 'value' causes this weird issue. I changed it to defaultValue and it worked. <ReactQuill ... defaultValue={text || ''} ... /> |
@Abderahman88 do you mean you changed this line?
The core issue seems to be still there, looks like this fix not actually helping much.. That is, it seems taht the controlled mode (value/onChange) is simply not working with RichText control (it probably never did though). The defaultValue addresses the "uncontrolled" mode of the |
@nbelyh The controlled mode is not working. (Tested with your example) This needs to be fixed 👍 |
Hi all, I've made the fix. Please, check beta version. |
Category
[ ] Enhancement
[X] Bug
[ ] Question
Version
Please specify what version of the library you are using: [1.20.0]
Expected / Desired Behavior / Question
I expect the text to update properly whenever the onChange handler is called. Also, why do you need it to return a string, instead of just accepting the updated state as a prop?
Observed Behavior
The webpart is only updating the first keystroke. All subsequent strokes seems to be disregarded, and will not be recorded unless I click outside the webpart and then refocus by clicking inside.
Steps to Reproduce
Please try the following code snippet:
The text was updated successfully, but these errors were encountered: