PanelRenderer: Improves PanelRenderer performance (#51092)

* PanelRenderer: Improves PanelRenderer performance

* Minor refactor

* remove old func
This commit is contained in:
Torkel Ödegaard
2022-06-20 14:41:39 +02:00
committed by GitHub
parent 694fd1c37b
commit 3a586a6053
4 changed files with 45 additions and 30 deletions

View File

@@ -375,4 +375,8 @@ export class PanelPlugin<
getSuggestionsSupplier(): VisualizationSuggestionsSupplier | undefined {
return this.suggestionsSupplier;
}
hasPluginId(pluginId: string) {
return this.meta.id === pluginId;
}
}

View File

@@ -16,6 +16,7 @@ export interface PanelRendererProps<P extends object = any, F extends object = a
title: string;
options?: Partial<P>;
onOptionsChange?: (options: P) => void;
onFieldConfigChange?: (config: FieldConfigSource<F>) => void;
onChangeTimeRange?: (timeRange: AbsoluteTimeRange) => void;
fieldConfig?: FieldConfigSource<Partial<F>>;
timeZone?: string;