File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -66,13 +66,6 @@ export default function plotComponentFactory(Plotly) {
6666 this . handleUpdateWithProps = this . handleUpdateWithProps . bind ( this ) ;
6767 }
6868
69- shouldComponentUpdate ( nextProps ) {
70- return (
71- nextProps . revision === void 0 ||
72- nextProps . revision !== this . props . revision
73- ) ;
74- }
75-
7669 componentDidMount ( ) {
7770 this . p = this . p
7871 . then ( ( ) => {
@@ -96,6 +89,17 @@ export default function plotComponentFactory(Plotly) {
9689 }
9790
9891 componentWillUpdate ( nextProps ) {
92+ if (
93+ ( nextProps . revision !== void 0 &&
94+ nextProps . revision === this . props . revision ) ||
95+ ( nextProps . layout === this . props . layout &&
96+ nextProps . data === this . props . data &&
97+ nextProps . config === this . props . config &&
98+ nextProps . frames === this . props . frames )
99+ ) {
100+ return ;
101+ }
102+
99103 this . p = this . p
100104 . then ( ( ) => {
101105 if ( hasReactAPIMethod ) {
You can’t perform that action at this time.
0 commit comments