PanelEditor: fixes save/apply for undefined props in restoreModel (#23939)

* PanelEditor: fixes save/apply for undefined props in restoreModel

* Refactor: changes after PR comments

* Refactor: changes sourcePanel refresh strategy

* Added unit tests and minor refactoring of method, starting with cleanup, then setting properties from model

* Update public/app/features/dashboard/state/PanelModel.test.ts

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
This commit is contained in:
Hugo Häggmark
2020-04-27 20:50:33 +02:00
committed by GitHub
parent 0dc8f4ea89
commit d91c0d1dec
5 changed files with 90 additions and 14 deletions

View File

@@ -349,7 +349,7 @@ const mapStateToProps: MapStateToProps<ConnectedProps, OwnProps, StoreState> = (
return {
location: state.location,
plugin: plugin,
panel: state.panelEditor.getPanel(),
panel,
data: state.panelEditor.getData(),
initDone: state.panelEditor.initDone,
tabs: getPanelEditorTabs(state.location, plugin),