-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team
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
No response
Description
When using matTooltip, passing an expression like "array.length" into [matTooltipDisabled] will be considered true even if array is empty, so the tooltip is always hidden.
Instead with the condition "array.length > 0" matTooltipDisabled works properly.
I don't know if this behavior used to work in a previous version but "array.length" is valid from ages as a boolean condition in angular (also in html)
Reproduction
StackBlitz link: https://stackblitz.com/edit/components-issue-starter-umfckoz3?file=src%2Fmain.html
Steps to reproduce:
- Hover the button
- See how no tooltip appears
- Try to update condition in "array.length > 0"
- See how now tooltip appears
Expected Behavior
When passing an expression as "array.length" matTooltipDisabled should disable the tooltip only when the array is not empty
Actual Behavior
When passing an expression as "array.length" matTooltipDisabled always disables tooltip
Environment
- Angular: 18.2.8 or newer
- CDK/Material: 18.2.8 or newer
- Browser(s): Google Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Metadata
Metadata
Assignees
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team