DashboardScene: Fixes compatability wrapper to make annotation list panel work (#82287)

This commit is contained in:
Torkel Ödegaard 2024-02-12 11:26:39 +01:00 committed by GitHub
parent 14ec1a7971
commit e2ea20b446
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,6 +32,9 @@ export class DashboardModelCompatibilityWrapper {
public constructor(private _scene: DashboardScene) { public constructor(private _scene: DashboardScene) {
const timeRange = sceneGraph.getTimeRange(_scene); const timeRange = sceneGraph.getTimeRange(_scene);
// Copied from DashboardModel, as this function is passed around
this.formatDate = this.formatDate.bind(this);
this._subs.add( this._subs.add(
timeRange.subscribeToState((state, prev) => { timeRange.subscribeToState((state, prev) => {
if (state.value !== prev.value) { if (state.value !== prev.value) {