bito-code-review[bot] commented on code in PR #37396:
URL: https://github.com/apache/superset/pull/37396#discussion_r3348378631


##########
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:
   <!-- Bito Reply -->
   The suggestion provided is appropriate for addressing the missing header 
fallback issue. It correctly restores the fallback to the column key when a 
label is not available, which ensures consistent UI behavior. However, as noted 
in the thread, there is a separate concern regarding index misalignment when 
columns are filtered, which should be addressed by mapping the column key to 
its original index.
   
   
**superset-frontend/src/explore/components/DataTablesPane/components/useGridResultTable.tsx**
   ```
   const colType = coltypes?.[index];
                 const headerLabel = collabels?.[index] ?? key;
   ```



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