Open gmondin opened 4 days ago
@gmondin Thank you for reporting. We will give triage later.
@gmondin could you upgrade to 9.0.1
try agian. if you have any questions please let me know.
@ArgoZhang Hi, I just update to 9.0.1, but, I still have the same problem. options is undefined when enter to the method.
@gmondin could you submit a repro-project? I can't reproduce this issue here.
Hi, I'm sorry, I cant share the project, but, I will copy the code:
razor
Tree Items="@_SideMenuItems" ShowIcon="true" ShowSkeleton="true" OnExpandNode="@OnClickMenu" OnTreeItemClick="@OnClickMenu" class="pi_tree_menu"
cs
[NotNull] List<TreeItem> _SideMenuItems { get; set; }
_SideMenuItems = await GetMenuItems(_menuItems.items);
private async Task<List<TreeItem>> GetMenuItems(ItemMenu[] items, List<ItemMenu> listActivesMenu = null)
{
List<TreeItem> res = new List<TreeItem>();
if (_menuItems != null)
{
foreach (var item in items)
{
TreeItem mi = new TreeItem
{
Id = item.ID.ToString(),
Text = string.IsNullOrWhiteSpace(item.HotKey) ? item.Desc : $"{item.HotKey} - {item.Desc}",
Icon = item.Icon,
IsActive = listActivesMenu != null && listActivesMenu.Where(x => x.ID == item.ID).Any(),
CssClass = listActivesMenu != null && listActivesMenu.Where(x => x.ID == item.ID).Any() ? "activeMenu" : string.Empty,
IsCollapsed = !(item.items != null && item.items.Count() > 0 && listActivesMenu != null && listActivesMenu.Where(x => x.ID == item.ID).Any())
};
if (item.items != null && item.items.Any() && item.items.Count() > 0) mi.Items = await GetMenuItems(item.items, listActivesMenu);
res.Add(mi);
}
}
return res;
}
private async Task OnClickMenu(TreeItem item)
{
_NavigationManager.NavigateTo(myUrl);
}
@gmondin create a new demo project for repro this issue not share your project.
Is there an existing issue for this?
Describe the bug
HI, after update to a 9.0.0 version, my tree view started have a javascript error, apparently its work, but when I tried to debug, I get this error.
Expected Behavior
I would like not to have this error on debug.
Interactive render mode
Interactive WebAssembly (Client-side rendering (CSR) using Blazor WebAssembly)
Steps To Reproduce
I have a treeview in my page
Exceptions (if any)
No response
.NET Version
9
Anything else?