-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: material/list
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
I guess never
Description
In the sanity check of the list item base class there is the variable numLines
which instead of using the number of lines actually uses the number of titles accidentally. You can see this here: https://github.com/angular/components/blob/03a773a0237843fd1e1e600d0b9911eb924319bc/src/material/list/list-base.ts#L329C9-L329C18
_titles
must be replaced by _lines
.
Reproduction
StackBlitz link: https://stackblitz.com/edit/angular-ex442q?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.module.ts
Steps to reproduce:
- Just see the HTML, it adds 4 list item lines
- The sanity check usually should forbid more than 3 lines
- But as it uses the title count for the check, it still works
Expected Behavior
Use the number of lines instead of titles.
Number of lines is limited to 3.
Actual Behavior
Uses the number of titles for the line count check.
Number of lines is not limited.
Environment
- Angular: any
- CDK/Material: any
- Browser(s): any
- Operating System (e.g. Windows, macOS, Ubuntu): any
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: material/list