Problem when using RenderFragment

Leo Do 10 Reputation points
2023-03-24T11:06:25.4433333+00:00

Hi,

I would like some help. I have List of RenderFragments which I am using to show various data in my Blazor component. I am trying to add functionality to delete one element of the list on click of the button. After simple List.RemoveAt method wasn't working as expected I tried to delete whole list and repopulate it with RenderFragments but then component's OnInitializedAsync() method is not invoked. Am I correct in understanding that RenderFragment objects are still in the memory and they are just reused. Is there a way to delete them from memory after removing them from the list?

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,565 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.