Hello !
After several tests, the RadzenTree's selected node don't clear properly. My package version is 3.1.10.
Here's my tree :
For reproduce the bug, with a item with a property "Expanded" for expand the node by click on the item instead of the arrow :
- Click on node 1 and extend it
- Reset the selected node elsewhere, use a button or something.
- Click on node 1 again (not the arrow, the arrow works properly) => It select it but don't call the callback for change value
What I do : When I set "SelectedNode" to "null" in a callback of a checkbox, it reset the visual of the tree, the Expanded property works properly.
But when I click again on the same node, it's do not call the callback "OnChangeTree". If I click on an other node, it calls the callback properly.
Try to call "StateHasChanged()" doesn't work either.
Hello again !
Actually, there's no need of a model with an Expanded value or something like that.
The bind-Value set to "null" in the code-behind update UI but not "intern store".
You can reproduce the bug like that :
1- Click on a element of the tree view
2- With an other element of your UI (a button for example), set the bind-Value to "null" in the code behind. => The UI deselect the element
3- Click on the same element of the tree view => The callback "Change" is not called
Hi @Zethzer,
We were able to reproduce the issue based on the instructions from your second post. We will investigate and include a fix in one of the next releases.
Hi @korchev
Great ! Thank you for the rapid answer. Happy to help.
And sorry for my awkward first post
Was there ever a fix developed for this? I'm having a similar issue with the Tree.
Edit:
I developed a workaround by inserting "await Task.Delay(10);" before the line setting the Value to null and adding "await InvokeAsync(StateHasChanged);" after.
For clarification: I am attempting to capture and then clear the value change in the method called by the Value change.
async void OnChangeGroupAccessTree()
{
var changedValue = GroupAccessTreeValue;
await Task.Delay(10);
GroupAccessTreeValue = null;
await InvokeAsync(StateHasChanged);
}