Enabled/Disabled chip element

Good evening, I've been looking at the documentation for the Chip component but I don't see information on how to disable a specific chip from the list

  function enabledDisabledChip(idChipList,valueSelect,flag)
        {
          var chipsList = document.getElementById(idChipList).ej2_instances[0];
           chipsList.chips.forEach(function (chip,index) {
          
                if(chip.value == valueSelect)
                {
                   chip.enabled= flag;
                }
         });
        }


In the angular documentation I think I have seen that you can disable the component

3 Replies 1 reply marked as answer

SP Sowmiya Padmanaban Syncfusion Team June 2, 2020 11:04 AM UTC

Hi Diego,  
 
Greetings from Syncfusion support. 
 
We have checked your requirement with Chip component. When adding “e-disabled” class to particular chip element, it disables the corresponding chip value. Refer the below code snippet. 
 
    <ejs-chiplist id="chip-default"> 
        <e-chips> 
            <e-chip text="Apple" cssClass="e-primary e-disabled" ></e-chip> 
            <e-chip text="Microsoft" cssClass="e-info"></e-chip> 
            <e-chip text="Google" cssClass="e-success" ></e-chip> 
            <e-chip text="Tesla" cssClass="e-warning" ></e-chip> 
            <e-chip text="Intel" cssClass="e-danger"></e-chip> 
        </e-chips> 
    </ejs-chiplist> 
 
When removing the “e-disabled” class, it again restore to the enabled state. Refer the sample link below. 
 
Refer the below link to know more about the Chip component. 
 
 
 
 
Please let us know, if you need any further assistance. 
 
Regards,  
Sowmiya.P 


Marked as answer

DI diego June 4, 2020 07:38 AM UTC

Okay, thanks your support


SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team June 4, 2020 07:44 AM UTC

Hi Diego, 
  
Welcome. Please, get back to us if you need any assistance on Syncfusion controls. We will be happy to assist you. 
  
Regards, 
Shameer Ali Baig S. 


Loader.
Up arrow icon