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

OnAfterRenderAsync not calling on the second child

$
0
0

I have a parent component that uses a child component twice as below:

<Childcomp Items="ItemsList1"/><Childcomp Items="ItemList2"/>

ItemList1 has 7 items and ItemList2 has 2 items.In the child component:

[Parameter]List<Item> Items;protected override void OnAfterRenderAsync(){  var counts = Items.Count();}

When I debug, the child's OnAfterRenderAsync is hit one time for the first child as I see count contains 7 only. It never it for the second child that has 2 items in it.Curious why it didn't fire for the second child?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



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