Set attribute disabled checkbox

2.2k Views Asked by At

i want to show the checkbox disabled when either of the values are coming, but it is working only for one value.

 <ui:inputCheckbox value="{!product.productSelection}" disabled="{! 
 or(product.orderLineStatus == 'Cancelled', product.orderLineStatus == 
 'Rejected',product.orderLineStatus == 'Scheduled to Ship')}"/>
1

There are 1 best solutions below

0
On

If product is attibute then you need to use v.product.yourfield if not then it is ok for your disabled condition see below code

 <ui:inputCheckbox value="{!product.productSelection}" disabled="{! 
   or(or(product.orderLineStatus == 'Cancelled', product.orderLineStatus == 
     'Rejected'),product.orderLineStatus == 'Scheduled to Ship')}"/>

if product is attribute then

 <ui:inputCheckbox value="{!v.product.productSelection}" disabled="{! 
  or(or(v.product.orderLineStatus == 'Cancelled', v.product.orderLineStatus == 
  'Rejected'),v.product.orderLineStatus == 'Scheduled to Ship')}"/>