Skip to content

Commit

Permalink
fix(ItemRow): In ListItem, Icon & Radio should be wrap in ListItemIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
Merkur39 committed Sep 11, 2023
1 parent 5773308 commit 6aaa10a
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions react/NestedSelect/ItemRow.jsx
Expand Up @@ -31,17 +31,23 @@ const ItemRow = ({ item, onClick, isSelected, radioPosition }) => {
{item.icon && <ListItemIcon>{item.icon}</ListItemIcon>}
<ListItemText primary={item.title} secondary={item.description} />

{item.children && item.children.length > 0 && <Icon icon={RightIcon} />}
{item.children && item.children.length > 0 && (
<ListItemIcon>
<Icon icon={RightIcon} />
</ListItemIcon>
)}

{radioPosition === 'right' &&
!(item.children && item.children.length > 0) && (
<Radio
readOnly
edge="end"
name={item.title}
value={item.title}
checked={!!isSelected}
/>
<ListItemIcon>
<Radio
readOnly
edge="end"
name={item.title}
value={item.title}
checked={!!isSelected}
/>
</ListItemIcon>
)}
</ListItem>
<Divider />
Expand Down

0 comments on commit 6aaa10a

Please sign in to comment.