diff --git a/public/app/features/alerting/unified/components/receivers/AlertInstanceModalSelector.tsx b/public/app/features/alerting/unified/components/receivers/AlertInstanceModalSelector.tsx index 3a59b16ec87..d87ef341359 100644 --- a/public/app/features/alerting/unified/components/receivers/AlertInstanceModalSelector.tsx +++ b/public/app/features/alerting/unified/components/receivers/AlertInstanceModalSelector.tsx @@ -1,6 +1,6 @@ import { css, cx } from '@emotion/css'; import { CSSProperties, useCallback, useMemo, useState } from 'react'; -import AutoSizer from 'react-virtualized-auto-sizer'; +import AutoSizer, { type Size } from 'react-virtualized-auto-sizer'; import { FixedSizeList } from 'react-window'; import { GrafanaTheme2 } from '@grafana/data'; @@ -235,7 +235,7 @@ export function AlertInstanceModalSelector({ {!loading && ( - {({ height, width }) => ( + {({ height, width }: Size) => ( {RuleRow} @@ -263,7 +263,7 @@ export function AlertInstanceModalSelector({ {selectedRule && rulesWithInstances[selectedRule].length && !loading && ( - {({ width, height }) => ( + {({ width, height }: Size) => ( - {({ width, height }) => ( + {({ width, height }: Size) => ( - {({ width, height }) => ( + {({ width, height }: Size) => ( setValue('content', value)} diff --git a/public/app/features/alerting/unified/components/receivers/form/fields/TemplateContentAndPreview.tsx b/public/app/features/alerting/unified/components/receivers/form/fields/TemplateContentAndPreview.tsx index 7a5c016a126..aa981ff9555 100644 --- a/public/app/features/alerting/unified/components/receivers/form/fields/TemplateContentAndPreview.tsx +++ b/public/app/features/alerting/unified/components/receivers/form/fields/TemplateContentAndPreview.tsx @@ -1,6 +1,6 @@ import { css, cx } from '@emotion/css'; import * as React from 'react'; -import AutoSizer from 'react-virtualized-auto-sizer'; +import AutoSizer, { type Size } from 'react-virtualized-auto-sizer'; import { GrafanaTheme2 } from '@grafana/data'; import { t } from '@grafana/i18n'; @@ -44,7 +44,7 @@ export function TemplateContentAndPreview({
- {({ width, height }) => ( + {({ width, height }: Size) => ( - {({ height, width }) => ( + {({ height, width }: Size) => ( - {({ width, height }) => ( + {({ width, height }: Size) => ( {PanelRow} diff --git a/public/app/features/alerting/unified/components/rule-editor/PreviewRuleResult.tsx b/public/app/features/alerting/unified/components/rule-editor/PreviewRuleResult.tsx index 0a30d3647ef..765afdc3af8 100644 --- a/public/app/features/alerting/unified/components/rule-editor/PreviewRuleResult.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/PreviewRuleResult.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; import * as React from 'react'; -import AutoSizer from 'react-virtualized-auto-sizer'; +import AutoSizer, { type Size } from 'react-virtualized-auto-sizer'; import { FieldConfigSource, FieldMatcherID, GrafanaTheme2, LoadingState } from '@grafana/data'; import { Trans, t } from '@grafana/i18n'; @@ -67,7 +67,7 @@ export function PreviewRuleResult(props: Props): React.ReactElement | null { )}
- {({ width, height }) => ( + {({ width, height }: Size) => (
- {({ width, height }) => + {({ width, height }: Size) => isSearching ? ( {
- {({ width, height }) => ( + {({ width, height }: Size) => ( { {this.renderPanelToolbar(styles)}
- {({ width, height }) => { + {({ width, height }: Size) => { if (width < 3 || height < 3) { return null; } diff --git a/public/app/features/dashboard/containers/SoloPanelPage.tsx b/public/app/features/dashboard/containers/SoloPanelPage.tsx index 1904e5eb487..feeb3e6a0a3 100644 --- a/public/app/features/dashboard/containers/SoloPanelPage.tsx +++ b/public/app/features/dashboard/containers/SoloPanelPage.tsx @@ -2,7 +2,7 @@ import { css } from '@emotion/css'; import { useCallback, useEffect, useState } from 'react'; import { connect, ConnectedProps } from 'react-redux'; import { useParams } from 'react-router-dom-v5-compat'; -import AutoSizer from 'react-virtualized-auto-sizer'; +import AutoSizer, { type Size } from 'react-virtualized-auto-sizer'; import { GrafanaTheme2 } from '@grafana/data'; import { Trans, t } from '@grafana/i18n'; @@ -119,7 +119,7 @@ export const SoloPanel = ({ dashboard, notFound, panel, panelId, timezone }: Sol return (
- {({ width, height }) => { + {({ width, height }: Size) => { if (width === 0) { return null; } diff --git a/public/app/features/expressions/components/SqlExpressions/SqlExpr.tsx b/public/app/features/expressions/components/SqlExpressions/SqlExpr.tsx index 361d748b716..5b9ff56c909 100644 --- a/public/app/features/expressions/components/SqlExpressions/SqlExpr.tsx +++ b/public/app/features/expressions/components/SqlExpressions/SqlExpr.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import { useMemo, useRef, useEffect, useState, lazy, Suspense, useCallback } from 'react'; import { useMeasure } from 'react-use'; -import AutoSizer from 'react-virtualized-auto-sizer'; +import AutoSizer, { type Size } from 'react-virtualized-auto-sizer'; import { SelectableValue, GrafanaTheme2 } from '@grafana/data'; import { t, Trans } from '@grafana/i18n'; @@ -349,7 +349,7 @@ LIMIT const renderStandaloneEditor = () => ( - {({ width, height }) => ( + {({ width, height }: Size) => ( {
- {({ width, height }) => { + {({ width, height }: Size) => { if (width === 0) { return null; } diff --git a/public/app/features/plugins/admin/components/PluginUsage.tsx b/public/app/features/plugins/admin/components/PluginUsage.tsx index 0ad9ebb1738..1037bc657ed 100644 --- a/public/app/features/plugins/admin/components/PluginUsage.tsx +++ b/public/app/features/plugins/admin/components/PluginUsage.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { useMemo } from 'react'; import { useAsync } from 'react-use'; -import AutoSizer from 'react-virtualized-auto-sizer'; +import AutoSizer, { type Size } from 'react-virtualized-auto-sizer'; import { of } from 'rxjs'; import { GrafanaTheme2, PluginMeta, PluginType } from '@grafana/data'; @@ -52,7 +52,7 @@ export function PluginUsage({ plugin }: Props) {
- {({ width, height }) => { + {({ width, height }: Size) => { return ( } > - {({ height, width }) => ( + {({ height, width }: Size) => (