mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Library Panels: Change unsaved change detection logic (#31477)
* Library Panels: Change unsaved change detection logic Change logic from diffing panel models to setting dirty flag
This commit is contained in:
@@ -28,8 +28,10 @@ export const PanelLibraryOptionsGroup: React.FC<Props> = ({ panel, dashboard })
|
||||
libraryPanel: toPanelModelLibraryPanel(panelInfo),
|
||||
});
|
||||
|
||||
// dummy change for re-render
|
||||
// onPanelConfigChange('isEditing', true);
|
||||
// Though the panel model has changed, since we're switching to an existing
|
||||
// library panel, we reset the "hasChanged" state.
|
||||
panel.hasChanged = false;
|
||||
|
||||
panel.refresh();
|
||||
panel.events.publish(PanelQueriesChangedEvent);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user