Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Dispose not called on child components in Blazor

$
0
0

I have a parent component that implements IDisposable, where I have a child component called MyGrid. Now MyGrid extends Syncfusion's SfGrid which itself implements IDisposable. When I close the parent component its Dispose method is called but Dispose inside MyGrid isn't called. Is it normal ? I thought Dispose had like a chain effect. Should I explicitly call Dispose on MyGrid (after getting a reference to it)?

Parent.razor :

<MyGrid ... />

MyGrid.cs :

public class MyGrid<T> : SfGrid<T>{    ...    public override async void Dispose()    {       await PersistDataAsync();    }}

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>