fix: Further drilling by different groupby fields #23754
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
Some charts, like Pivot Table (
groupbyRows
,groupbyColumns
), Mixed Chart (groupby
,groupby_b
) or Graph (source
,target
) have more than 1 dimensions field in their form data.If user started drilling by 1 field (e.g.
groupbyRows
) and then attempted further drilling by another field (e.g.groupbyColumns
), the drilling would incorrectly apply the selected dimension to the first field instead of the second.Moreover, if a chart has multiple adhoc filter fields (Mixed Chart -
adhoc_filters
andadhoc_filters_b
), the same problem would occur - the filter might get applied to the wrong field.This PR fixes the issue by passing the information about current drilling config to the modal, so that it knows how to construct the form data of the drilled chart.
Also, we save the history of drilling configs in the state so that the "undo" feature also works correctly.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
Screen.Recording.2023-04-20.at.17.44.03.mov
After:
Screen.Recording.2023-04-20.at.17.42.18.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION