geido commented on code in PR #22785:
URL: https://github.com/apache/superset/pull/22785#discussion_r1084306083
##########
superset-frontend/src/components/DropdownSelectableIcon/index.tsx:
##########
@@ -86,24 +101,40 @@ export default (props: DropDownSelectableProps) => {
{info}
</div>
)}
- {menuItems.map(m => (
- <Menu.Item key={m.key}>
- {m.label}
- {selectedKeys?.includes(m.key) && (
- <Icons.Check iconColor={theme.colors.primary.base} />
- )}
- </Menu.Item>
- ))}
+ {menuItems.map(m =>
+ m.children?.length ? (
+ <SubMenu
+ title={m.label}
+ key={m.key}
+ data-test="dropdown-selectable-icon-submenu"
+ >
+ {m.children.map(s => menuItem(s.label, s.key))}
+ </SubMenu>
+ ) : (
+ menuItem(m.label, m.key)
+ ),
+ )}
</StyledMenu>
),
[info, menuItems],
);
return (
- <StyledDropdownButton
- overlay={overlayMenu}
- trigger={['click']}
- icon={icon}
- />
+ <>
+ <Global
+ styles={css`
+ .ant-dropdown-menu .ant-dropdown-menu-item > .tick-menu-item {
+ float: right;
+ margin-right: 0;
+ font-size: ${theme.typography.sizes.xl}px;
Review Comment:
Great tip!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]