dashboard: Close/hide 'Add Panel' before saving a dashboard (#10482)

Fixes #10472
This commit is contained in:
Marcus Efraimsson
2018-01-11 08:56:19 +01:00
committed by Torkel Ödegaard
parent 9606a34e0a
commit 2843961677
2 changed files with 21 additions and 1 deletions

View File

@@ -145,7 +145,10 @@ export class DashboardModel {
};
// get panel save models
copy.panels = _.map(this.panels, panel => panel.getSaveModel());
copy.panels = _.chain(this.panels)
.filter(panel => panel.type !== 'add-panel')
.map(panel => panel.getSaveModel())
.value();
// sort by keys
copy = sortByKeys(copy);