diff --git a/public/app/features/dashboard-scene/scene/DashboardScene.test.tsx b/public/app/features/dashboard-scene/scene/DashboardScene.test.tsx index 094b94573e0..f08e544e1a4 100644 --- a/public/app/features/dashboard-scene/scene/DashboardScene.test.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardScene.test.tsx @@ -829,7 +829,6 @@ describe('DashboardScene', () => { expect(res).toBe(true); expect(scene.state.version).toBe(newVersion); - expect(scene.state.title).toBe('new name'); expect(scene.state.isEditing).toBe(false); }); }); diff --git a/public/app/features/dashboard-scene/scene/DashboardScene.tsx b/public/app/features/dashboard-scene/scene/DashboardScene.tsx index c5cdc3f1db7..8c9d84bf950 100644 --- a/public/app/features/dashboard-scene/scene/DashboardScene.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardScene.tsx @@ -327,8 +327,8 @@ export class DashboardScene extends SceneObjectBase { const newState = sceneUtils.cloneSceneObjectState(dashScene.state); newState.version = versionRsp.version; - this._initialState = newState; - this.exitEditMode({ skipConfirm: false, restoreIntialState: true }); + this.setState(newState); + this.exitEditMode({ skipConfirm: true, restoreIntialState: false }); return true; };