-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Ensure main_dttm_col is adhered to for non-drag-and-drop #20712
Conversation
@@ -289,14 +289,14 @@ const granularity_sqla: SharedControlConfig<'SelectControl', ColumnMeta> = { | |||
mapStateToProps: state => { | |||
const props: Partial<SelectControlConfig<ColumnMeta | QueryColumn>> = {}; | |||
const { datasource } = state; | |||
if (datasource?.columns[0]?.hasOwnProperty('main_dttm_col')) { | |||
if (datasource?.hasOwnProperty('main_dttm_col')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main_dttm_col
property exists on the datasource object as opposed the associated columns.
Codecov Report
@@ Coverage Diff @@
## master #20712 +/- ##
=======================================
Coverage 66.83% 66.83%
=======================================
Files 1750 1750
Lines 65894 65894
Branches 7017 7017
=======================================
Hits 44041 44041
Misses 20067 20067
Partials 1786 1786
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Co-authored-by: John Bodley <john.bodley@airbnb.com> (cherry picked from commit a6abcd9)
SUMMARY
This PR fixes a regression introduced in #19855 where for non-drag-and-drop the
main_dttm_col
wasn't being adhered to when creating a new chart.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE
AFTER
TESTING INSTRUCTIONS
Tested locally.
ADDITIONAL INFORMATION