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


##########
superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx:
##########


Review Comment:
   `knownKeys` is only passed from Table and AG Grid `transformProps`. This 
call still uses the default, so `knownKeys` is `colnames`.
   
   A dataset column or saved metric named `Time` that is absent from the 
current result stays put on render, because `transformProps` passes 
`column_name` and `metric_name`. This control does not. The popover shows that 
config on `__timestamp`, and the next edit of any column writes it to 
`column_config.__timestamp` and drops the `Time` key. The chart read path 
cannot undo that write.
   
   The new test passes `['Time', '__timestamp']` straight into 
`normalizeColumnConfigKeys`. Please pass the same known column and metric names 
into this call. After that, an edit still drops a key that is outside 
`colnames`, and it no longer stores that key on `__timestamp`.



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