From d75b55b523579dd7521c9838f792526d03ecefee Mon Sep 17 00:00:00 2001 From: Tomasz Kajtoch Date: Tue, 18 Jul 2023 16:41:07 +0200 Subject: [PATCH] fix!: update EuiDataGridCellProps renderCellValue types to fix type inference issues on React 18 --- src/components/datagrid/data_grid_types.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/datagrid/data_grid_types.ts b/src/components/datagrid/data_grid_types.ts index 7e36f8a79819..82d994bdfbf0 100644 --- a/src/components/datagrid/data_grid_types.ts +++ b/src/components/datagrid/data_grid_types.ts @@ -18,6 +18,7 @@ import { Ref, Component, PropsWithChildren, + ComponentClass, } from 'react'; import { VariableSizeGridProps, @@ -582,8 +583,8 @@ export interface EuiDataGridCellProps { className?: string; popoverContext: DataGridCellPopoverContextShape; renderCellValue: - | JSXElementConstructor - | ((props: EuiDataGridCellValueElementProps) => ReactNode); + | ((props: EuiDataGridCellValueElementProps) => ReactNode) + | ComponentClass; renderCellPopover?: | JSXElementConstructor | ((props: EuiDataGridCellPopoverElementProps) => ReactNode);