semohr commented on code in PR #37396:
URL: https://github.com/apache/superset/pull/37396#discussion_r3348174569
##########
superset-frontend/src/explore/components/DataTablesPane/components/useGridResultTable.tsx:
##########
@@ -37,7 +37,7 @@ export function useGridColumns(
.filter((column: string) => Object.keys(data[0]).includes(column))
.map((key, index) => {
const colType = coltypes?.[index];
- const headerLabel = columnDisplayNames?.[key] ?? key;
+ const headerLabel = collabels?.[index];
Review Comment:
Indeed the columnnames and coltypes can miss-align here. I think we can just
swap the filter and map and should be able to resolve the bug here.
##########
superset-frontend/src/explore/components/DataTablesPane/components/useGridResultTable.tsx:
##########
@@ -37,7 +37,7 @@ export function useGridColumns(
.filter((column: string) => Object.keys(data[0]).includes(column))
.map((key, index) => {
const colType = coltypes?.[index];
- const headerLabel = columnDisplayNames?.[key] ?? key;
+ const headerLabel = collabels?.[index];
Review Comment:
Indeed the column names and column labels can miss-align here. I think we
can just swap the filter and map and should be able to resolve the bug here.
--
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]