Chore: Some type fixes needed for react 18 (#65600)

some type fixes needed for react 18
This commit is contained in:
Ashley Harrison
2023-03-30 13:40:18 +01:00
committed by GitHub
parent 6f6ebf5b18
commit 98e66654d6
6 changed files with 8 additions and 8 deletions

View File

@@ -85,7 +85,7 @@ export const DashboardPicker = ({ dashboardUid, panelId, isOpen, onChange, onDis
const selectedDashboardIsInPageResult = selectedDashboardIndex >= 0;
const scrollToItem = useCallback(
(node) => {
(node: FixedSizeList) => {
const canScroll = selectedDashboardIndex >= 0;
if (isDefaultSelection && canScroll) {

View File

@@ -63,8 +63,7 @@ const MetricValueEdit = (props: CanvasElementProps<TextConfig, TextData>) => {
panelData = context.instanceState?.scene?.data.series;
const onFieldChange = useCallback(
(field) => {
console.log('onfieldchange', field);
(field: string | undefined) => {
let selectedElement: ElementState;
selectedElement = context.instanceState?.selected[0];
if (selectedElement) {

View File

@@ -27,7 +27,7 @@ export const PanelEditorTabs = React.memo(({ panel, dashboard, tabs, onChangeTab
const styles = useStyles2(getStyles);
const instrumentedOnChangeTab = useCallback(
(tab) => {
(tab: PanelEditorTab) => {
if (!tab.active) {
reportInteraction('panel_editor_tabs_changed', { tab_id: tab.id });
}