-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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(Explore): Pivot table V2 sort by failure with D&D enabled #18835
Conversation
superset-frontend/packages/superset-ui-core/src/query/buildQueryObject.ts
Outdated
Show resolved
Hide resolved
superset-frontend/packages/superset-ui-core/src/query/buildQueryObject.ts
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #18835 +/- ##
=======================================
Coverage 66.36% 66.37%
=======================================
Files 1620 1620
Lines 63041 63046 +5
Branches 6375 6376 +1
=======================================
+ Hits 41839 41844 +5
Misses 19543 19543
Partials 1659 1659
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Tested, works perfectly!
* wip * Add tests and clean up * Clean up * Remove unused import (cherry picked from commit eafe0cf)
SUMMARY
This PR fixes an issue for which the Pivot Table V2 would fail when the "Sort by" control was cleared with D&D enabled.
The reason for the failure was that when the "Sort by" was cleared, the
series_limit_metric
was passed as an empty array due to the default behavior of the Select control.With the changes in this PR, the
series_limit_metric
type is strictly checked and converted toundefined
when the selection is cleared up / an empty array is passed.BEFORE
DEV.Video.Game.Sales.Pivot.Table.V2.mp4
AFTER
DEV.Video.Game.Sales.Pivot.Table.V2.1.mp4
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
ENABLE_EXPLORE_DRAG_AND_DROP
ENABLE_DND_WITH_CLICK_UX