Scenes/LibraryPanels: Fix issue where library panels plugin type was not set correctly (#82917)

pull/82914/head
kay delaney 1 year ago committed by GitHub
parent dfaf6d1e2e
commit 3a63311286
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      public/app/features/dashboard-scene/scene/LibraryVizPanel.tsx

@ -41,16 +41,17 @@ export class LibraryVizPanel extends SceneObjectBase<LibraryVizPanelState> {
};
private async loadLibraryPanelFromPanelModel() {
const vizPanel = this.state.panel;
let vizPanel = this.state.panel;
try {
const libPanel = await getLibraryPanel(this.state.uid, true);
const libPanelModel = new PanelModel(libPanel.model);
vizPanel.setState({
vizPanel = vizPanel.clone({
options: libPanelModel.options ?? {},
fieldConfig: libPanelModel.fieldConfig,
pluginVersion: libPanelModel.pluginVersion,
displayMode: libPanelModel.transparent ? 'transparent' : undefined,
description: libPanelModel.description,
pluginId: libPanel.type,
$data: createPanelDataProvider(libPanelModel),
});
} catch (err) {

Loading…
Cancel
Save