PrimeNG Dropdown binding to disabled property not working

Published

I have a PrimeNG p-dropdown control with its disabled property bound to a boolean property. Essentially it looks like this:

<p-dropdown [disabled]="disableGroupsDropdown"></p-dropdown>

This boolean defaults to true, and the dropdown is properly disabled. I have other code that can modify this boolean property.

When I execute this code, the state of the dropdown doesn’t change.

  console.log('enabling');
  this.disableGroupsDropdown = false;

I am getting the console.log statement saying "enabling" but the dropdown remains disabled.

What am I missing?

Source: Angular Questions

Published
Categorized as angular, primeng, primeng-dropdowns Tagged , ,

Answers

Try this, trust me it’s working..

<input [disabled]="isLoading ? true : null" />

Use null instead of false


Kallie Olson

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq