how to make option unselectable

Hi! Is it possible to disable item select option? Thank you

3 Replies 1 reply marked as answer

PM Ponmani Murugaiyan Syncfusion Team August 26, 2020 09:16 AM UTC

Hi Andry,  

Greetings from Syncfusion support. 

As per your requirement, we have prepared sample for disable the dropdown item. Please find the code snippet below for your reference. 

public disableItems = ['Game3','Game7'] 
itemCreated: (e)=> {  
    if (this.disableItems.indexOf(e.curData.Id) > -1) {   
      e.item.classList.remove('e-list-item');  
      e.item.classList.add('e-disable-list-item');   
      e.item.classList.add('e-disabled');  
    }  
  }  


Output: 
 
 


Kindly check with the above sample meets your requirement. If not, please elaborate more on your requirement to provide you the solution at earliest. 
 
Regards, 
Ponmani M

Marked as answer

AC Andry Christian August 26, 2020 04:52 PM UTC

Thank you very much, it works very well


PM Ponmani Murugaiyan Syncfusion Team August 27, 2020 05:14 AM UTC

Hi Andry, 

We are glad to hear that the provided suggestion help you to achieve your requirement. Please get back us if you need further assistance. 

Regards, 
Ponmani M 


Loader.
Up arrow icon