ListItemText with primary, secondary, secondaryTypographyProps does not display correctly #19943
Closed
2 tasks done
Labels
bug 🐛
Something doesn't work
component: list
This is the name of the generic UI component, not the React module!
good first issue
Great for first contributions. Enable to learn the contribution process.
When using a
ListItemText
component with the fieldsprimary
,secondary
, and specificallysecondaryTypographyProps
the text is not displayed properly inside of theListItemText
. Thesecondary
prop once givensecondaryTypographyProps
is displayed at the end of theprimary
text instead of on its own row below.Current Behavior 😯
If a
ListItemText
component is givensecondaryTypographyProps
it will join theprimary
text on the first line.Expected Behavior 🤔
It seems as you would want the
secondary
text to be allowed itssecondaryTypographyProps
and retain its position on the second row as it does withoutsecondaryTypographyProps
.Steps to Reproduce 🕹
Here is a codesandbox of the recreation using the MUI template - but for clarity's sake, here is the snippet:
Here is a picture of the above code in action:
Steps:
ListItemText
component to aList
primary
,secondary
, and most importantlysecondaryTypographyProps
to theListItemText
Not a step to reproduce, but could get the desired effect by applying
display: gird
to.MuiListItemText-multiline
. Not an expert though so not 100% sure that is the desired solution.Context 🔦
I need to be able to style the
secondary
text in theListItemText
to achieve my desired ux.Your Environment 🌎
The text was updated successfully, but these errors were encountered: