You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/09/30 22:22:13 UTC

[GitHub] [superset] EugeneTorap commented on a diff in pull request #21667: fix(sqllab): async query broken due to #21320

EugeneTorap commented on code in PR #21667:
URL: https://github.com/apache/superset/pull/21667#discussion_r984980531


##########
superset-frontend/src/SqlLab/components/SqlEditor/index.jsx:
##########
@@ -229,13 +229,20 @@ const SqlEditor = ({
     }
   };
 
-  useState(() => {
+  const runQuery = () => {
+    if (database) {
+      startQuery();
+    }
+  };
+
+  // hack the useMemo hook to imitate componentWillMount
+  useMemo(() => {

Review Comment:
   @eric-briscoe am I correct
   useMemo(() => {}, []); is componentWillMount event.
   useEffect(() => {}, []); is componentDidMount



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org