Skip to content

Commit

Permalink
fix flow errors
Browse files Browse the repository at this point in the history
  • Loading branch information
romainlancia committed Apr 8, 2021
1 parent 4c3af7e commit 24480e9
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/lib/components/dropdown/Dropdown.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type Props = {
icon?: Node,
caret?: boolean,
dataIndex?: number,
iconExternal?: Node,
onClick?: (SyntheticMouseEvent<HTMLDivElement>) => void,
};

Expand Down Expand Up @@ -174,7 +175,13 @@ const DropdownAsAnItem = ({
>
{items.map(
(
{ label, onClick, submenuIcon, submenuItems, iconExternal },
{
label,
onClick,
submenuIcon = null,
submenuItems = [],
iconExternal = null,
},
index,
) => {
return (
Expand Down Expand Up @@ -269,7 +276,13 @@ function Dropdown({
>
{items.map(
(
{ label, onClick, submenuIcon, submenuItems, iconExternal },
{
label,
onClick,
submenuIcon = null,
submenuItems = [],
iconExternal = null,
},
index,
) => {
return (
Expand Down

0 comments on commit 24480e9

Please sign in to comment.