SBIN2010 commented on code in PR #43938:
URL: https://github.com/apache/superset/pull/43938#discussion_r4148158601


##########
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:
##########
@@ -884,10 +897,18 @@ export default function TableChart<D extends DataRecord = 
DataRecord>(
 
   // Compute visible columns before groupHeaderColumns to ensure index 
consistency.
   // This filters out columns with config.visible === false.
-  const visibleColumnsMeta = useMemo(
-    () => filteredColumnsMeta.filter(col => col.config?.visible !== false),
-    [filteredColumnsMeta],
-  );
+  const { visibleColumnsMeta, hasHeaderGroups } = useMemo(() => {
+    const visible = filteredColumnsMeta.filter(
+      col => col.config?.visible !== false,
+    );
+    const hasGroups = hasRenderableHeaderGroups(headerGroups, visible);
+    return {
+      visibleColumnsMeta: hasGroups
+        ? orderColumnsByHeaderGroups(visible, headerGroups)

Review Comment:
   fix in 5605f8ea5c — When header groups are enabled, React Table resets the 
drag order, and the groups no longer move onto other columns.



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

Reply via email to