diff --git a/public/app/features/dashboard/state/PanelModel.test.ts b/public/app/features/dashboard/state/PanelModel.test.ts index bd0c872e6b6..204d0242576 100644 --- a/public/app/features/dashboard/state/PanelModel.test.ts +++ b/public/app/features/dashboard/state/PanelModel.test.ts @@ -214,10 +214,15 @@ describe('PanelModel', () => { }); }); + model.editSourceId = 1001; model.changePlugin(newPlugin); model.alert = { id: 2 }; }); + it('should keep editSourceId', () => { + expect(model.editSourceId).toBe(1001); + }); + it('should apply next panel option defaults', () => { expect(model.getOptions().showThresholdLabels).toBeFalsy(); expect(model.getOptions().showThresholds).toBeUndefined(); diff --git a/public/app/features/dashboard/state/PanelModel.ts b/public/app/features/dashboard/state/PanelModel.ts index 405f563f340..c92df8b4c1b 100644 --- a/public/app/features/dashboard/state/PanelModel.ts +++ b/public/app/features/dashboard/state/PanelModel.ts @@ -84,6 +84,7 @@ const mustKeepProps: { [str: string]: boolean } = { queryRunner: true, transformations: true, fieldConfig: true, + editSourceId: true, }; const defaults: any = {