Plugins: Allow async panel migrations (#73782)

* Plugins: Allow async panel migrations

* comment
This commit is contained in:
Josh Hunt
2023-08-28 10:06:55 +00:00
committed by GitHub
parent 7543a28ae2
commit f95405d3c3
6 changed files with 54 additions and 12 deletions

View File

@@ -30,7 +30,7 @@ export function initPanelState(panel: PanelModel): ThunkResult<Promise<void>> {
}
if (!panel.plugin) {
panel.pluginLoaded(plugin);
await panel.pluginLoaded(plugin);
}
dispatch(panelModelAndPluginReady({ key: panel.key, plugin }));
@@ -120,7 +120,7 @@ export function changeToLibraryPanel(panel: PanelModel, libraryPanel: LibraryEle
plugin = await dispatch(loadPanelPlugin(newPluginId));
}
panel.pluginLoaded(plugin);
await panel.pluginLoaded(plugin);
panel.generateNewKey();
await dispatch(panelModelAndPluginReady({ key: panel.key, plugin }));