Skip to content

bug(material/list): input coercion for disableRipple on list items does not work #27125

Closed
@sonallux

Description

@sonallux

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

Disabling the ripple effect on a mat-list-item is currently not possible when using just disableRipple on the mat-list-item element. The compiler throws the following error: error TS2322: Type 'string' is not assignable to type 'boolean'.

It works when using the verbose [disableRipple]="true" syntax.

Reproduction

Steps to reproduce:

  1. Add the following snippet to a template
<mat-action-list>
    <button mat-list-item disableRipple>Item</button>
</mat-action-list>
  1. See the compiler throwing this error: error TS2322: Type 'string' is not assignable to type 'boolean'.

Expected Behavior

It is possible to disable the ripple effect on a mat-list-item by just putting disableRipple inside the element tag.

Actual Behavior

The compiler throws an error.

Environment

Angular CLI: 16.0.2 and 15.2.8
Node: 18.15.0
Package Manager: npm 9.5.0
OS: win32 x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/list

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions