Skip to content

Commit

Permalink
RadzenTree throws collection modified exception when SingleExpand is …
Browse files Browse the repository at this point in the history
…set to true.
  • Loading branch information
akorchev committed Jan 2, 2025
1 parent 661e5b5 commit c1e428d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Radzen.Blazor/RadzenTreeItem.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public partial class RadzenTreeItem : IDisposable
.Add("rzi-caret-right", !clientExpanded)
.Add(Tree.ItemIconCssClass)
.Add(IconCssClass);
private ClassList LabelClassList => ClassList.Create("rz-treenode-label")
private ClassList LabelClassList => ClassList.Create("rz-treenode-label")
.Add(Tree.ItemLabelCssClass)
.Add(LabelCssClass);
/// <summary>
Expand Down Expand Up @@ -105,17 +105,17 @@ public partial class RadzenTreeItem : IDisposable
[Parameter]
public IEnumerable Data { get; set; }

/// <summary>
/// Gets or sets the CSS classes added to the content.
/// <summary>
/// Gets or sets the CSS classes added to the content.
/// </summary>
[Parameter]
public string ContentCssClass { get; set; }
public string ContentCssClass { get; set; }

/// <summary>
/// Gets or sets the CSS classes added to the icon.
/// </summary>
[Parameter]
public string IconCssClass { get; set; }
public string IconCssClass { get; set; }

/// <summary>
/// Gets or sets the CSS classes added to the label.
Expand Down Expand Up @@ -229,7 +229,7 @@ async Task Expand()

if (Tree.SingleExpand)
{
var siblings = ParentItem?.items ?? Tree.items;
var siblings = (ParentItem?.items ?? Tree.items).ToList();

foreach (var sibling in siblings)
{
Expand Down

0 comments on commit c1e428d

Please sign in to comment.