Disabling node is not disabling the click on any other functionality on Node

Hi,
I have used disableNodes([nodeIds]) function to disable the node with all the nodeIds. It is not working as expected, even though the color of node text is changed , all other functionalities like expanding the node and nodeclicked event all are enabled . I need to disable all these actions once the node is disabled. 
Could you please provide me the solution for this issue.


Regards,
Pooja K

1 Reply 1 reply marked as answer

SS Sharon Sanchez Selvaraj Syncfusion Team April 21, 2021 09:53 AM UTC

Hi Pooja, 
 
Greetings from Syncfusion Support. We suspect that you are using Angular EJ2 TreeView component in your sample. We have created a sample wherein the required actions are prevented. 
 
Refer to the code snippet. 
 
  nodeExpand(args) { 
    if (args.node.classList.contains("e-disable")) { 
      args.cancel = true; 
    } 
  } 
  nodeClick(args) { 
    if (args.node.classList.contains("e-disable")) { 
      args.cancel = true; 
    } 
  } 
 
 
 
Refer to the sample. 
 
 
Please get back to us if you need further assistance. 
 
Regards, 
 
Sharon Sanchez S. 


Marked as answer
Loader.
Up arrow icon