diegomedina248 commented on code in PR #20783: URL: https://github.com/apache/superset/pull/20783#discussion_r925468312
########## superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx: ########## @@ -92,11 +92,10 @@ function Echart( previousSelection.current = currentSelection; }, [currentSelection]); - useEffect(() => { - if (chartRef.current) { - chartRef.current.resize({ width, height }); - } - }, [width, height]); + // Ensure that each render and resize is idempotent + if (chartRef.current) { + chartRef.current.resize({ width, height }); Review Comment: will this trigger an expensive operation on the chart? Cause this will run on each render now. Could useLayoutEffect work? -- 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-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org