NewPanelEdit: Minor fixes (#23425)

This commit is contained in:
Torkel Ödegaard 2020-04-08 13:49:35 +02:00 committed by GitHub
parent 05ea159082
commit 137b47ccbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -85,7 +85,9 @@ export const PanelOptionsTab: FC<Props> = ({
}
if (plugin.angularPanelCtrl) {
elements.push(<AngularPanelOptions panel={panel} dashboard={dashboard} plugin={plugin} />);
elements.push(
<AngularPanelOptions panel={panel} dashboard={dashboard} plugin={plugin} key="angular panel options" />
);
}
elements.push(

View File

@ -54,7 +54,10 @@ export function panelEditorCleanUp(): ThunkResult<void> {
// Resend last query result on source panel query runner
// But do this after the panel edit editor exit process has completed
setTimeout(() => {
sourcePanel.getQueryRunner().pipeDataToSubject(panel.getQueryRunner().getLastResult());
const lastResult = panel.getQueryRunner().getLastResult();
if (lastResult) {
sourcePanel.getQueryRunner().pipeDataToSubject(lastResult);
}
}, 20);
}