instructure-react / react-tinymce

React TinyMCE component
181 stars 110 forks source link

use the latest handler passed in by the props #33

Open zthomas opened 8 years ago

zthomas commented 8 years ago

Since the shouldComponentUpdate only checks props.content and props.config, if you change an event handler, the component will still be using the previous handler. A simple fix would be to just always get the latest handler from the props to call instead of using the one stored in the closure.

Just a suggestion, but it is a bug that I had to address in production.