RadzenTree OnExpand and async

Using an async OnExpand callback for populating args.Children doesn't seem to be working. Defining the callback as async works but as soon as I await something, even just a Task.Delay, the children do not get populated in the view.

Example:

public async Task OnExpand(TreeExpandEventArgs args)
{
    await Task.Delay(1000);
    
    args.Children.Data = new List<string> { "Item 1", "Item 2", "Item 3" };
    args.Children.Text = item => (string)item;
    args.Children.HasChildren = item => false;
}

Am I doing something wrong?

Hi @Chris,

No, you are not doing anything wrong. The problem is there is a missing await in the Tree implementation. We will address that problem with the next release of the Radzen Blazor Components.

Thank you (also for the awesome components). I'm looking forward to the fix.

Hi guys, I just post an issue very similar to this when I'm using the "HttpClient.GetStringAsync" call. I saw that there's now a await when calling the Expand callback but still the control return anyway. Any idea?