Skip to content

Commit

Permalink
fix(EuiFlexItem): fix ref prop type to equal what's actually being …
Browse files Browse the repository at this point in the history
…rendered
  • Loading branch information
tkajtoch committed Apr 30, 2024
1 parent e6a0fd8 commit a26c214
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/flex/flex_item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ const EuiFlexItemInternal = <TComponent extends ComponentPropType>(
// Cast forwardRef return type to work with the generic TComponent type
// and not fallback to implicit any typing
export const EuiFlexItem = forwardRef(EuiFlexItemInternal) as <
TComponent extends ComponentPropType
TComponent extends ComponentPropType,
TComponentRef = ReturnType<typeof EuiFlexItemInternal>
>(
props: EuiFlexItemProps<TComponent> & {
ref?: Ref<typeof EuiFlexItemInternal>;
ref?: Ref<TComponentRef>;
}
) => ReturnType<typeof EuiFlexItemInternal>;

Expand Down

0 comments on commit a26c214

Please sign in to comment.