I can't seem to find a way to unselect a single node using the blazor treeview.
In my use case I need to allow only a single selected node, so I can't use the AllowMultiSelection property.
I would like to have the node deselect when a user clicks on the previously selected node.
I've tried to use the NodeClicked event to set the select property of the node contained in the eventcallback parameter to false, but that doesn't change anything.
void onSingleNodeClicked(NodeClickEventArgs e)
{
if(e.NodeData.Selected)
{
//Both of these seem to do thing
tree.GetNode(e.NodeData.Name).Selected = false;
e.NodeData.Selected = false;
}
}
Could you help me? Thank you.