I am currently working on making the MUI component Breadcrumbs
responsive.
The issue I am facing is that when the Breadcrumbs
component fills up all available space, the items shrink and use ellipsis like a Typography
component with the noWrap
property set.
While I am aware of the itemsBeforeCollapse
, itemsAfterCollapse
, and maxItems
props, these properties are related to the number of items compared to viewport size rather than the width of each individual item.
I have attempted setting the noWrap
property on both the Typography
and Link
components (since Link
extends Typography
props), but unfortunately the ellipsis does not display and the Link
or Typography
component does not shrink as expected.
<Breadcrumbs>
{links.map((link, i) =>
i !== links.length - 1 ? (
<Link
key={i}
underline={'hover'}
noWrap
>
{link}
</Link>
) : (
<Typography noWrap key={i}>
{link}
</Typography>
),
)}
</Breadcrumbs>
If you want to see the issue in action, you can view this codeSandbox: