From 7312f3b50f2df6a7f515b6de09453f91681451a1 Mon Sep 17 00:00:00 2001 From: Kyle Doherty <5248953+kdoh@users.noreply.github.com> Date: Tue, 11 Oct 2022 08:50:29 -0400 Subject: [PATCH] preserve url params when saving data app pages (#25874) * preserve params when saving the dashboard, essential for data apps details * keep existing behavior for normal dashboards, keep params for pages --- frontend/src/metabase/dashboard/actions/save.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/metabase/dashboard/actions/save.js b/frontend/src/metabase/dashboard/actions/save.js index 451d5d96e6a..7253cb395a7 100644 --- a/frontend/src/metabase/dashboard/actions/save.js +++ b/frontend/src/metabase/dashboard/actions/save.js @@ -159,8 +159,12 @@ export const saveDashboardAndCards = createThunkAction( await dispatch(Dashboards.actions.update(dashboard)); - // make sure that we've fully cleared out any dirty state from editing (this is overkill, but simple) - dispatch(fetchDashboard(dashboard.id, null)); // disable using query parameters when saving + if (dashboard.is_app_page) { + dispatch(fetchDashboard(dashboard.id, window.location.search, true)); + } else { + // make sure that we've fully cleared out any dirty state from editing (this is overkill, but simple) + dispatch(fetchDashboard(dashboard.id, null)); // disable using query parameters when saving + } }; }, ); -- GitLab