diff --git a/packages/grafana-ui/src/components/Forms/Legacy/Select/Select.tsx b/packages/grafana-ui/src/components/Forms/Legacy/Select/Select.tsx index ab47f4245d8..50c0438084c 100644 --- a/packages/grafana-ui/src/components/Forms/Legacy/Select/Select.tsx +++ b/packages/grafana-ui/src/components/Forms/Legacy/Select/Select.tsx @@ -52,6 +52,7 @@ export const MenuList = (props: MenuListProps) => { ); }; export class Select extends PureComponent> { + declare context: React.ContextType; static contextType = ThemeContext; static defaultProps: Partial> = { @@ -248,7 +249,7 @@ export class AsyncSelect extends PureComponent> { placeholder={placeholder || 'Choose'} //@ts-expect-error styles={resetSelectStyles(this.context)} - loadingMessage={() => loadingMessage} + loadingMessage={loadingMessage} noOptionsMessage={noOptionsMessage} isDisabled={isDisabled} isSearchable={isSearchable} diff --git a/public/app/features/dashboard/containers/DashboardPage.tsx b/public/app/features/dashboard/containers/DashboardPage.tsx index 3e2d1aa2c9c..3320cd423cf 100644 --- a/public/app/features/dashboard/containers/DashboardPage.tsx +++ b/public/app/features/dashboard/containers/DashboardPage.tsx @@ -8,7 +8,7 @@ import { config, locationService } from '@grafana/runtime'; import { Themeable2, withTheme2 } from '@grafana/ui'; import { notifyApp } from 'app/core/actions'; import { Page } from 'app/core/components/Page/Page'; -import { GrafanaContext } from 'app/core/context/GrafanaContext'; +import { GrafanaContext, GrafanaContextType } from 'app/core/context/GrafanaContext'; import { createErrorNotification } from 'app/core/copy/appNotification'; import { getKioskMode } from 'app/core/navigation/kiosk'; import { GrafanaRouteComponentProps } from 'app/core/navigation/types'; @@ -98,6 +98,7 @@ export interface State { } export class UnthemedDashboardPage extends PureComponent { + declare context: GrafanaContextType; static contextType = GrafanaContext; private forceRouteReloadCounter = 0; diff --git a/public/app/features/dashboard/containers/SoloPanelPage.tsx b/public/app/features/dashboard/containers/SoloPanelPage.tsx index 257fd94b201..3573aeeee31 100644 --- a/public/app/features/dashboard/containers/SoloPanelPage.tsx +++ b/public/app/features/dashboard/containers/SoloPanelPage.tsx @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import { connect, ConnectedProps } from 'react-redux'; import AutoSizer from 'react-virtualized-auto-sizer'; -import { GrafanaContext } from 'app/core/context/GrafanaContext'; +import { GrafanaContext, GrafanaContextType } from 'app/core/context/GrafanaContext'; import { GrafanaRouteComponentProps } from 'app/core/navigation/types'; import { DashboardModel, PanelModel } from 'app/features/dashboard/state'; import { StoreState } from 'app/types'; @@ -35,6 +35,7 @@ export interface State { } export class SoloPanelPage extends Component { + declare context: GrafanaContextType; static contextType = GrafanaContext; state: State = { diff --git a/public/app/plugins/panel/canvas/CanvasPanel.tsx b/public/app/plugins/panel/canvas/CanvasPanel.tsx index b57e3549674..b0f184782f6 100644 --- a/public/app/plugins/panel/canvas/CanvasPanel.tsx +++ b/public/app/plugins/panel/canvas/CanvasPanel.tsx @@ -35,6 +35,7 @@ let isInlineEditOpen = false; export const activePanelSubject = new ReplaySubject(1); export class CanvasPanel extends Component { + declare context: React.ContextType; static contextType = PanelContextRoot; panelContext: PanelContext = {} as PanelContext; diff --git a/public/app/plugins/panel/geomap/GeomapPanel.tsx b/public/app/plugins/panel/geomap/GeomapPanel.tsx index 2ec74c4ec25..daa8f89b577 100644 --- a/public/app/plugins/panel/geomap/GeomapPanel.tsx +++ b/public/app/plugins/panel/geomap/GeomapPanel.tsx @@ -45,6 +45,7 @@ interface State extends OverlayProps { } export class GeomapPanel extends Component { + declare context: React.ContextType; static contextType = PanelContextRoot; panelContext: PanelContext | undefined = undefined; private subs = new Subscription(); diff --git a/public/app/plugins/panel/text/TextPanel.tsx b/public/app/plugins/panel/text/TextPanel.tsx index 57096477e0e..cf7a265057f 100644 --- a/public/app/plugins/panel/text/TextPanel.tsx +++ b/public/app/plugins/panel/text/TextPanel.tsx @@ -19,6 +19,7 @@ interface State { } export class TextPanel extends PureComponent { + declare context: React.ContextType; static contextType = ThemeContext; constructor(props: Props) {