Skip to content

Allow specifying number of lines in a mat-list-item #15466

Closed
@calebegg

Description

@calebegg

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:

  <div mat-line></div>
  <div mat-line></div>
  <div mat-line></div>

Metadata

Metadata

Assignees

Labels

GThis is is related to a Google internal issueP3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions