semohr commented on code in PR #37396:
URL: https://github.com/apache/superset/pull/37396#discussion_r3348138674
##########
superset-frontend/src/explore/components/DataTableControl/index.tsx:
##########
@@ -236,13 +246,38 @@ const DataTableTemporalHeaderCell = ({
onClick={(e: React.MouseEvent<HTMLElement>) => e.stopPropagation()}
/>
</Popover>
- {displayLabel ?? columnName}
+ {columnLabel ?? columnName}
</span>
) : (
- <span>{displayLabel ?? columnName}</span>
+ <span>{columnLabel ?? columnName}</span>
);
};
+const DataTableHeaderCell = ({
+ columnName,
+ columnLabel,
+}: {
+ columnName: string;
+ columnLabel?: string;
+}) => {
+ // Use label if provided, otherwise use column name
+ // as header
+ const displayText = columnLabel || columnName;
Review Comment:
Yeah I intentionally used `||` (and not nullish coalesce) as empty strings
as labels should fall back to the name imo.
You think we should allow empty strings as labels?
--
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]