diff --git a/platform/ui/src/components/Dropdown/Dropdown.jsx b/platform/ui/src/components/Dropdown/Dropdown.jsx index 8d298dc86..f13852aad 100644 --- a/platform/ui/src/components/Dropdown/Dropdown.jsx +++ b/platform/ui/src/components/Dropdown/Dropdown.jsx @@ -10,7 +10,7 @@ const Dropdown = ({ titleElement, title, list }) => { const renderTitleElement = () => { if (titleElement) { - return <>{titleElement}; + return titleElement; } return ( @@ -44,29 +44,35 @@ const Dropdown = ({ titleElement, title, list }) => { } )} > - {list.map((item, idx) => ( -
{ - setOpen(false); - - if (item.onClick) { - item.onClick(); - } - }} - > - {!!item.icon && ( - - )} - {item.title} -
- ))} + {list.map( + ( + { + title: itemTitle, + icon: itemIcon, + onClick: itemOnClick = () => {}, + }, + idx + ) => ( +
{ + setOpen(false); + itemOnClick(); + }} + > + {!!itemIcon && ( + + )} + {itemTitle} +
+ ) + )} ); };