Using PrimeNg p-dropdown in component.
<p-dropdown
[options]="productRequest"
formControlName="request"
optionLabel="ProductName"
(onChange)="someFunction('request')">
</p-dropdown>
Below is the JSON received from server that is used as [options]
in p-dropdown
{
"Increase": true,
"Decrease" : true,
"Like" : true,
"Dislike" : true,
"Old" : false,
"Others" : true
}
I need to disable that option against which boolean: false
is mentioned.
Like while i click on dropdown, i am able to see all options. Now i need to disable that particular option against which boolean: false
is mentioned.
In above case i should be able to select all options except Old
as it has boolean: false
against it.
How to do so ?? Thanks in advance..