EnxDev commented on code in PR #37396:
URL: https://github.com/apache/superset/pull/37396#discussion_r2731155013


##########
superset-frontend/src/explore/components/DataTableControl/index.tsx:
##########
@@ -222,6 +222,31 @@ const DataTableTemporalHeaderCell = ({
   );
 };
 
+const DataTableHeaderCell = ({
+  columnName,
+  columnLabel,
+}: {
+  columnName: string;
+  columnLabel?: string;
+}) => {
+  // Use label if provided, otherwise use column name
+  // as header
+  const displayText = columnLabel || columnName;
+  if (columnLabel && columnLabel !== columnName) {
+    return (
+      <Popover
+        content={`${t('Column name')}: ${columnName}`}
+        placement="bottomLeft"
+        arrow={{ pointAtCenter: true }}
+      >
+        <span>{displayText}</span>
+      </Popover>
+    );
+  }
+
+  return <span>{displayText}</span>;
+};
+

Review Comment:
   Should this be moved into a separate component?



##########
superset-frontend/src/explore/components/DataTablesPane/components/SamplesPane.tsx:
##########
@@ -54,6 +54,7 @@ export const SamplesPane = ({
   const [filterText, setFilterText] = useState('');
   const [data, setData] = useState<Record<string, any>[][]>([]);
   const [colnames, setColnames] = useState<string[]>([]);
+  const [collabels, setCollabels] = useState<string[]>([]);

Review Comment:
   I’m wondering whether this could be undefined to preserve backward 
compatibility
   



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