diff --git a/superset-frontend/src/explore/components/ExploreViewContainer.jsx b/superset-frontend/src/explore/components/ExploreViewContainer.jsx index 097ab6ee6c87d..6fe99e5682b9f 100644 --- a/superset-frontend/src/explore/components/ExploreViewContainer.jsx +++ b/superset-frontend/src/explore/components/ExploreViewContainer.jsx @@ -194,12 +194,19 @@ function ExploreViewContainer(props) { const addHistory = useCallback( ({ isReplace = false, title } = {}) => { - const payload = { ...props.form_data }; + const formData = props.dashboardId + ? { + ...props.form_data, + dashboardId: props.dashboardId, + } + : props.form_data; + const payload = { ...formData }; const longUrl = getExploreLongUrl( - props.form_data, + formData, props.standalone ? URL_PARAMS.standalone.name : null, false, ); + try { if (isReplace) { window.history.replaceState(payload, title, longUrl);