-
Notifications
You must be signed in to change notification settings - Fork 450
Closed
Description
🐛 Bug Report
When generating a FluentTreeView using a recursive function, only the first item is rendered and it throws Cannot read properties of undefined (reading 'parentNode')
on click.
💻 Repro or Code Sample
<FluentTreeView>
@{
RenderTree(0, 3);
void RenderTree(int depth, int maxDepth)
{
if (depth >= maxDepth)
{
return;
}
<FluentTreeItem Text="item">
@{ RenderTree(depth + 1, maxDepth); }
</FluentTreeItem>
}
}
</FluentTreeView>
🤔 Expected Behavior
I expect a tree to be generate with 3 levels of items and that the click to expand works.
😯 Current Behavior
Only the first item is generated and it throws this on click
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: TypeError: Cannot read properties of undefined (reading 'parentNode')
TypeError: Cannot read properties of undefined (reading 'parentNode')
🔦 Context
I have a tree data structure and I'm trying to display it using a FluentTreeView.
🌍 Your Environment
- OS & Device: Windows on PC
- Browser: Google Chrome
- .NET: 8.0.1
- Microsoft.FluentUI.AspNetCore.Components: 4.3.0
Metadata
Metadata
Assignees
Labels
No labels