Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow specifying number of lines in a mat-list-item #15466
The framework tries to be clever and count the mat-line children to determine whether to put mat-2-line and mat-3-line classes on a mat-list-item. Sometimes, though, the real contents is too complex to have top-level mat-line items, and I just want to specify that I want the mat-3-line styling. However, if I add this class myself, Angular helpfully removes it :/
It'd be great to be able to specify this somehow, possibly just through the class, or through a mat-3-line directive.
Right now, my workaround is to put some empty divs in like:
Oh, that would work. I didn't know it would be that easy.
It's basically something like:
I'd be tempted to put mat-line on the timestamp and status divs as well if I didn't understand how it worked, so I'm not sure if it's exactly clear what's happening, but it would definitely solve the issue for me and I think it would be an improvement over what we have now.