justinpark commented on code in PR #23871:
URL: https://github.com/apache/superset/pull/23871#discussion_r1181912029
##########
superset-frontend/src/SqlLab/components/SqlEditor/index.jsx:
##########
@@ -354,39 +355,28 @@ const SqlEditor = ({
return base;
}, [dispatch, queryEditor.sql, startQuery, stopQuery]);
- const handleWindowResize = useCallback(() => {
+ const handleWindowResize = useEffectEvent(() => {
setHeight(getSqlEditorHeight());
Review Comment:
In this approach, this doesn't need to wrap with useEffectEvent since no
references needed other than setHeight.
Let me clean up with setHeight then.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]