File tree 1 file changed +11
-7
lines changed
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) {
66
66
this . handleUpdateWithProps = this . handleUpdateWithProps . bind ( this ) ;
67
67
}
68
68
69
- shouldComponentUpdate ( nextProps ) {
70
- return (
71
- nextProps . revision === void 0 ||
72
- nextProps . revision !== this . props . revision
73
- ) ;
74
- }
75
-
76
69
componentDidMount ( ) {
77
70
this . p = this . p
78
71
. then ( ( ) => {
@@ -96,6 +89,17 @@ export default function plotComponentFactory(Plotly) {
96
89
}
97
90
98
91
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
+
99
103
this . p = this . p
100
104
. then ( ( ) => {
101
105
if ( hasReactAPIMethod ) {
You can’t perform that action at this time.
0 commit comments