etr2460 commented on a change in pull request #9210: Add maximize and minimize 
feature to charts
URL: 
https://github.com/apache/incubator-superset/pull/9210#discussion_r387127646
 
 

 ##########
 File path: 
superset-frontend/src/dashboard/components/gridComponents/ChartHolder.jsx
 ##########
 @@ -107,21 +107,33 @@ class ChartHolder extends React.Component {
       outlinedComponentId: null,
       outlinedColumnName: null,
       directPathLastUpdated: 0,
+      isFullSize: false,
+      resizeEvent: false,
     };
 
     this.handleChangeFocus = this.handleChangeFocus.bind(this);
     this.handleDeleteComponent = this.handleDeleteComponent.bind(this);
     this.handleUpdateSliceName = this.handleUpdateSliceName.bind(this);
+    this.handleFullSize = this.handleFullSize.bind(this);
   }
 
   componentDidMount() {
     this.hideOutline({}, this.state);
   }
 
   componentDidUpdate(prevProps, prevState) {
+    this.finishResizeEvent();
     this.hideOutline(prevState, this.state);
   }
 
+  finishResizeEvent() {
+    setTimeout(() => {
+      if (this.state.resizeEvent) {
+        this.setState(() => ({ resizeEvent: false }));
+      }
+    }, 200);
 
 Review comment:
   are we guaranteed that the event will end in 200ms? what if something is 
really slow?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to