From 3af0867f32062d5f149ca18bd8451a1d7959101c Mon Sep 17 00:00:00 2001 From: Denis Voituron Date: Fri, 19 Jul 2024 12:36:49 +0200 Subject: [PATCH] [TreeView] Fix the first item never selected (#2414) * Fix the first element not clickable * Remove extra spaces --- src/Core/Components/TreeView/FluentTreeItem.razor.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Core/Components/TreeView/FluentTreeItem.razor.cs b/src/Core/Components/TreeView/FluentTreeItem.razor.cs index 3c4007b626..6e1fedcd6a 100644 --- a/src/Core/Components/TreeView/FluentTreeItem.razor.cs +++ b/src/Core/Components/TreeView/FluentTreeItem.razor.cs @@ -215,6 +215,7 @@ internal static RenderFragment GetFluentTreeItem(FluentTreeView owner, ITreeView builder.AddAttribute(i++, "Disabled", item.Disabled); builder.AddAttribute(i++, "IconCollapsed", item.IconCollapsed); builder.AddAttribute(i++, "IconExpanded", item.IconExpanded); + builder.SetKey(item.Id); if (owner.ItemTemplate != null) {