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/07/27 18:25:50 UTC

[GitHub] [superset] rusackas commented on a diff in pull request #20833: fix(charts): Table Chart doesn't twitch when resizing

rusackas commented on code in PR #20833:
URL: https://github.com/apache/superset/pull/20833#discussion_r931431271


##########
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:
##########
@@ -526,6 +541,41 @@ export default function TableChart<D extends DataRecord = DataRecord>(
     [setDataMask],
   );
 
+  const handleSizeChange = useCallback(
+    ({ width, height }: { width: number; height: number }) => {
+      setTableSize({ width, height });
+    },
+    [],
+  );
+
+  useLayoutEffect(() => {
+    // After initial load the table should resize only when the new sizes
+    // Are not only scrollbar updates, otherwise, the table would twicth

Review Comment:
   Appreciate the comments! This helps SOOOO much.



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