Fix missing dashboardId (#17380)

This commit is contained in:
Geido 2021-11-11 19:07:00 +02:00 committed by GitHub
parent 28944f57e1
commit 7cdd58b2db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -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);