swordev/suid

Problem with <ListItemText/>

T3ch0o opened this issue · 1 comments

T3ch0o commented

The secondary attribute doesn't apply any changes to the component.

<ListItemText primary={user.data?.username} secondary={<Typography>{user.data?.email}</Typography>} />

This should display the username and the email below, but only the username is displayed.

Could you share the source code?

This code works:

https://stackblitz.com/edit/zc2ij8?file=src%2FApp.tsx

import {
  Typography,
  List,
  ListItem,
  ListItemButton,
  ListItemText,
} from '@suid/material';

export default function BasicList() {
  return (
    <List>
      <ListItem>
        <ListItemButton>
          <ListItemText
            primary="user1"
            secondary={<Typography>user1@localhost</Typography>}
          />
        </ListItemButton>
      </ListItem>
    </List>
  );
}