mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Library Panels: Fix error when changing viz of panel with multiple instances (#33915)
This commit is contained in:
parent
3d47bf247f
commit
c6dd19f163
@ -104,9 +104,11 @@ function updateDuplicateLibraryPanels(modifiedPanel: PanelModel, dashboard: Dash
|
|||||||
|
|
||||||
// Loaded plugin is not included in the persisted properties
|
// Loaded plugin is not included in the persisted properties
|
||||||
// So is not handled by restoreModel
|
// So is not handled by restoreModel
|
||||||
panel.plugin = modifiedSaveModel.plugin;
|
const pluginChanged = panel.plugin?.meta.id !== modifiedPanel.plugin?.meta.id;
|
||||||
|
panel.plugin = modifiedPanel.plugin;
|
||||||
|
panel.configRev++;
|
||||||
|
|
||||||
if (panel.type !== modifiedPanel.type) {
|
if (pluginChanged) {
|
||||||
dispatch(panelModelAndPluginReady({ panelId: panel.id, plugin: panel.plugin! }));
|
dispatch(panelModelAndPluginReady({ panelId: panel.id, plugin: panel.plugin! }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user