mirror of
https://github.com/apache/superset.git
synced 2026-05-12 03:15:55 +00:00
fix(SaveModal): reset chart state when saving and going to a dashboard (#36402)
This commit is contained in:
committed by
GitHub
parent
f955f0d133
commit
b40467c7e2
@@ -46,6 +46,7 @@ import { canUserEditDashboard } from 'src/dashboard/util/permissionUtils';
|
||||
import { setSaveChartModalVisibility } from 'src/explore/actions/saveModalActions';
|
||||
import { SaveActionType } from 'src/explore/types';
|
||||
import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes';
|
||||
import { removeChartState } from 'src/dashboard/actions/dashboardState';
|
||||
import { Dashboard } from 'src/types/Dashboard';
|
||||
|
||||
// Session storage key for recent dashboard
|
||||
@@ -276,6 +277,7 @@ class SaveModal extends Component<SaveModalProps, SaveModalState> {
|
||||
|
||||
// Go to new dashboard url
|
||||
if (gotodash && dashboard) {
|
||||
this.props.dispatch(removeChartState(value.id));
|
||||
this.props.history.push(dashboard.url);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user