Dashboard: New panel in a dashboard is not deleted after "Discard"-ing changes in Panel Edit (#66476)

* add isNew notPersistedProperty to PanelModel

* if panel is newly created and user "Discard"s it, the panel is removed entirely

* add Todo's for when we remove the emptyDashboardPage FF

* add isNew to new panel after file dropping on dashboard page

* handle the "Apply" case

* CSV file dropping is not relevant to a new panel bc it doesnt open edit page
This commit is contained in:
Polina Boneva
2023-04-25 17:18:58 +03:00
committed by GitHub
parent 63777ea368
commit fe23c76250
7 changed files with 18 additions and 1 deletions

View File

@@ -293,6 +293,7 @@ export class DashboardModel implements TimeModel {
}
private getPanelSaveModels() {
// Todo: Remove panel.type === 'add-panel' when we remove the emptyDashboardPage toggle
return this.panels
.filter(
(panel) =>