From fba29e28ddc81ddbe78c5a1ecaa81197db07600e Mon Sep 17 00:00:00 2001 From: Tomasz Kajtoch Date: Thu, 2 Nov 2023 22:48:39 +0100 Subject: [PATCH] fix: fix `renderItem` type resolution --- src/components/side_nav/side_nav.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/side_nav/side_nav.tsx b/src/components/side_nav/side_nav.tsx index 996057856b2..663042523f5 100644 --- a/src/components/side_nav/side_nav.tsx +++ b/src/components/side_nav/side_nav.tsx @@ -9,7 +9,7 @@ import React, { Component, ReactNode, MouseEventHandler } from 'react'; import classNames from 'classnames'; -import { CommonProps } from '../common'; +import { CommonProps, PropsOf } from '../common'; import { EuiSideNavItem, RenderItem } from './side_nav_item'; import { EuiSideNavItemType } from './side_nav_types'; @@ -146,7 +146,9 @@ export class EuiSideNav extends Component> { items={renderedItems} key={id} depth={depth} - renderItem={renderItem} + renderItem={ + renderItem as PropsOf['renderItem'] + } truncate={truncate} childrenOnly={childrenOnly} {...rest}