Can't cancel TreeView NodeCollapsing Event

Hi

I want to prevent the collapsing of TreeView nodes.

I see there's an "Node collapsing" event so I used a callback function to set "Cancel" to "true" since that's what the method description says ("If you want to cancel this event [...] set cancel as true")

1.png


But this does not prevent the collapse at all. What's more, it seems the collapse happens BEFORE the callback is even triggered (which is what I expect to happen in the event of "NodeCOLLAPSED", not "NodeCOLLAPSING").

I attached an example, it's just the demo code with the events added as I described.


Cheers


Attachment: BlazorSampleAppNodeCoallpsingBug_19acbf4d.zip

2 Replies

SM Shalini Maragathavel Syncfusion Team November 17, 2021 11:20 AM UTC

Hi Lazar, 
 
Greetings from Syncfusion support.  
 
We have validated your reported issue with TreeView component and considered the reported scenario “The NodeCollapsing event is not triggered before the TreeView node is collapsed” as a bug from our end. The fix for this issue will be included in Volume 4 release by the mid of December 2021.    

You can track the status of your reported problem through the below portal link. 
  

Until then, we appreciate your patience. 

Regards,
Shalini M. 



IL Indhumathy Loganathan Syncfusion Team November 22, 2022 01:19 PM UTC

Hi Lazar,


We are glad to announce that our patch release (V20.3.58) has been rolled out successfully. The issue “The NodeCollapsing event is not triggered before the TreeView node is collapsed”  has been resolved in this release. To access this fix, we suggest you update the package to 20.3.58.


For your reference, we include the sample in the latest version.


Samplehttps://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazorSampleAppNodeCoallpsingBug64168749.zip


Feedback: https://www.syncfusion.com/feedback/30430/the-nodecollapsing-event-is-not-triggered-before-the-treeview-node-is-collapsed


Release Notes: https://blazor.syncfusion.com/documentation/release-notes/20.3.58?type=all#treeview


Regards,

Indhumathy L


Loader.
Up arrow icon