Uh oh!
There was an error while loading. Please reload this page.
Fix an issue, that would cause tinymce to be updated too often - #29
Fix an issue, that would cause tinymce to be updated too often#29marchbnr wants to merge 1 commit into
Conversation
tuarrep
commented
Aug 31, 2016
Seems to not working for me. The component is still rerendered |
| 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?
valoricDe
commented
Oct 6, 2016
Hi, I created a merge request, incorporating your changes. Could you give your five cents on this one?: #44 |
marchbnr
commented
Oct 6, 2016
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? |
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.