You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current React implementation of the editor fires the onChange function when the value prop changes. This causes spurious rerenders and is in conflict with the standards of what I've seen basically any other editor library use.
This was causing a particularly gnarly bug in my use-case where I had a large data structure where the editor could be used to edit various different parts of it. When I pointed the editor at a different part of it (by changing its value and the passed onChange function) it would execute the onChange function of the previous render (together with the fieldName of the previous render), causing it to override the previous text in the datastructure with the text of the new part that was being navigated to. This of course was not the intended result and required some ugly hacks to work around.
The text was updated successfully, but these errors were encountered:
The current React implementation of the editor fires the onChange function when the value prop changes. This causes spurious rerenders and is in conflict with the standards of what I've seen basically any other editor library use.
This was causing a particularly gnarly bug in my use-case where I had a large data structure where the editor could be used to edit various different parts of it. When I pointed the editor at a different part of it (by changing its value and the passed onChange function) it would execute the onChange function of the previous render (together with the fieldName of the previous render), causing it to override the previous text in the datastructure with the text of the new part that was being navigated to. This of course was not the intended result and required some ugly hacks to work around.
The text was updated successfully, but these errors were encountered: