Fix an issue, that would cause tinymce to be updated too often#29
Open
marchbnr wants to merge 1 commit intoinstructure-react:masterfrom
Open
Fix an issue, that would cause tinymce to be updated too often#29marchbnr wants to merge 1 commit intoinstructure-react:masterfrom
marchbnr wants to merge 1 commit intoinstructure-react:masterfrom
Conversation
|
Seems to not working for me. The component is still rerendered |
TuningGuide
reviewed
Sep 25, 2016
|
|
||
| componentDidMount() { | ||
| const config = clone(this.props.config); | ||
| this._init(config); |
There was a problem hiding this comment.
I think it would be better to use cloneDeep here?
|
Hi, I created a merge request, incorporating your changes. Could you give your five cents on this one?: #44 |
Author
|
I am not working on React at the moment and I don't have an environment to test your changes. However, the problem that I had was, that the original property object was modified by TinyMCE's init, which is why I passed the deeply cloned config to the init method. That way, changing the isEqual method was not required. It seems to me like there was a bug in the componentDidMount method, which you have fixed, but I guess that should have been enough? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the props have nested elements, the comparison between the existing props and the new props will fail, due to TinyMCE doing modifications on the react component's config prop.