[PR #1442] [MERGED] avoid add invalid items in InsertInCurrentItems in Tree #2747

Closed
opened 2026-01-29 18:20:18 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/1442
Author: @msiggi
Created: 3/26/2024
Status: Merged
Merged: 3/27/2024
Merged by: @enchev

Base: masterHead: fix-tree-InsertInCurrentItems-issue


📝 Commits (1)

  • 9962673 avoid add invalid items in InsertInCurrentItems

📊 Changes

1 file changed (+8 additions, -6 deletions)

View changed files

📝 Radzen.Blazor/RadzenTree.razor.cs (+8 -6)

📄 Description

From Radzen V4.24.7 to V4.25.0 the TreeView in my Project was not working anymore. I got the following error in Browser-Console:

System.ArgumentOutOfRangeException: Index must be within the bounds of the List. (Parameter 'index')
   at System.Collections.Generic.List`1.Insert(Int32 index, T item)
   at Radzen.Blazor.RadzenTree.InsertInCurrentItems(Int32 index, RadzenTreeItem item)
   at Radzen.Blazor.RadzenTreeItem.OnInitializedAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
   at Radzen.Blazor.RadzenTreeItem.SetParametersAsync(ParameterView parameters)

These changes fixed it in my case.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/1442 **Author:** [@msiggi](https://github.com/msiggi) **Created:** 3/26/2024 **Status:** ✅ Merged **Merged:** 3/27/2024 **Merged by:** [@enchev](https://github.com/enchev) **Base:** `master` ← **Head:** `fix-tree-InsertInCurrentItems-issue` --- ### 📝 Commits (1) - [`9962673`](https://github.com/radzenhq/radzen-blazor/commit/996267333dc45f87fa3cedd3175a141c83759b68) avoid add invalid items in InsertInCurrentItems ### 📊 Changes **1 file changed** (+8 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/RadzenTree.razor.cs` (+8 -6) </details> ### 📄 Description From Radzen V4.24.7 to V4.25.0 the TreeView in my Project was not working anymore. I got the following error in Browser-Console: ``` System.ArgumentOutOfRangeException: Index must be within the bounds of the List. (Parameter 'index') at System.Collections.Generic.List`1.Insert(Int32 index, T item) at Radzen.Blazor.RadzenTree.InsertInCurrentItems(Int32 index, RadzenTreeItem item) at Radzen.Blazor.RadzenTreeItem.OnInitializedAsync() at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() at Radzen.Blazor.RadzenTreeItem.SetParametersAsync(ParameterView parameters) ``` These changes fixed it in my case. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:20:18 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#2747