Topic: Material Select Does Not Support “disabled: false”

rctoone pro asked 4 years ago

Why doesn't your material select option allow setting disabled options programmatically like the following:

this.disOptionsSelect = [
{ value: '1', label: 'not disabled option 1', disabled: false},

Instead I have to do the following by not including the "disabled" field. 
{ value: '1', label: 'not disabled option 1'}

Since you support setting disabled to true. I would expect you can also set it to false as to be able to set the field dynamically with an object. Not allowing this makes the use of the object completely useless...

Dawid Adach pro answered 4 years ago

Dear rctoone , actually, our material select allows that :) please try following code:


<div class="row">
<mdb-select [options]="optionsSelect"placeholder="Choose your option"></mdb-select>
<label>Example label</label>


export class AppComponent implements OnInit {
ngOnInit() {
this.optionsSelect= [
{value: '0', label: 'Aech'},
{value: '1', label: 'Art3mis', disabled: true},
{value: '2', label: 'Daito'},
{value: '3', label: 'Parzival'},
{value: '4', label: 'Shoto', disabled: true}

rctoone pro commented 4 years ago

Actually it doesn't. the code you pasted in from the example has disabled set to true. As the questioned stated, try setting it to false and see what happens (it will still be disabled).

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No