Components: mat-button disabled binding doesn't work

Created on 16 Dec 2017  路  6Comments  路  Source: angular/components

Bug, feature request, or proposal:

Bug. It looks like the [disabled] binding is not working on buttons with the mat-button directive.

What is the expected behavior?

It should work if I bind disabled to a property on my component

What is the current behavior?

It only works if I just have the disabled attribute on the button
<button mat-button disabled>Test</button> works.
<button mat-button [disabled]="progress">Test</button> does not work.

What are the steps to reproduce?

This is my html.

  <button mat-button [disabled]="!filterValid">Search</button>

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Latest versions of Angular and Angular Material.

Is there anything else we should know?

Maybe I'm doing something wrong here... I just upgraded my angular and material versions and it broke all my disabled attributes.

Most helpful comment

oh my fucking effing god.

what the fuck.

why?

All 6 comments

Looks like this is working. I must've been doing something wrong.

Try insert the value without quotes!!

[disabled]=!filterValid

I had the same error and these was the only solution that I've found

oh my fucking effing god.

what the fuck.

why?

@WrongWayJerry [disabled]="cost opening " but not closing " ?

@tatsujb I deleted my comment about the disable appearance not working. It was user error. I fixed it.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelb-01 picture michaelb-01  路  3Comments

alanpurple picture alanpurple  路  3Comments

jelbourn picture jelbourn  路  3Comments

Hiblton picture Hiblton  路  3Comments

julianobrasil picture julianobrasil  路  3Comments