Skip to content

Commit

Permalink
react fragment around function component
Browse files Browse the repository at this point in the history
  • Loading branch information
yozaam committed Sep 3, 2021
1 parent 84a7a2f commit abe209f
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -46,7 +46,12 @@ export const createMenuItems = (actions: KebabMenuOption[]) =>
) : (
<ContextMenuItem
key={index} // eslint-disable-line react/no-array-index-key
component={<KebabItem option={option} onClick={() => onKebabOptionClick(option)} />}
/* wrap in Fragment as KebabItem is a Function Component: gives warning on adding ref prop */
component={
<>
<KebabItem option={option} onClick={() => onKebabOptionClick(option)} />{' '}
</>
}
/>
),
);
Expand Down

0 comments on commit abe209f

Please sign in to comment.