Skip to content

Commit

Permalink
fix: fix renderItem type resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
tkajtoch committed Nov 3, 2023
1 parent 1f6983c commit fba29e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/side_nav/side_nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -146,7 +146,9 @@ export class EuiSideNav<T> extends Component<EuiSideNavProps<T>> {
items={renderedItems}
key={id}
depth={depth}
renderItem={renderItem}
renderItem={
renderItem as PropsOf<typeof EuiSideNavItem>['renderItem']
}
truncate={truncate}
childrenOnly={childrenOnly}
{...rest}
Expand Down

0 comments on commit fba29e2

Please sign in to comment.