Skip to content
Snippets Groups Projects
Commit 854345ce authored by Atte Keinänen's avatar Atte Keinänen Committed by GitHub
Browse files

Merge pull request #5544 from metabase/fix-5278

Recover display settings if they get lost in dashboard drill-through
parents 184b2edf 8e5bf2a9
No related branches found
No related tags found
No related merge requests found
......@@ -516,9 +516,17 @@ export const navigateToNewCardFromDashboard = createThunkAction(
const {dashboardId, dashboards, parameterValues} = getState().dashboard;
const dashboard = dashboards[dashboardId];
const cardIsDirty = !_.isEqual(previousCard.dataset_query, nextCard.dataset_query);
const cardAfterClick = getCardAfterVisualizationClick(nextCard, previousCard);
// clicking graph title with a filter applied loses display type and visualization settings; see #5278
const cardWithVizSettings = {
...cardAfterClick,
display: cardAfterClick.display || previousCard.display,
visualization_settings: cardAfterClick.visualization_settings || previousCard.visualization_settings
}
const url = questionUrlWithParameters(
getCardAfterVisualizationClick(nextCard, previousCard),
cardWithVizSettings,
metadata,
dashboard.parameters,
parameterValues,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment