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

MudBlazor ChildContent property error on a MudButton inside à MudExpansionPanel

$
0
0
Unhandled exception rendering component: Unable to set property 'ChildContent' on object of type 'MudBlazor.MudButton'. The error was: Specified cast is not valid.

I have this error while working on a project and didn't find anything online to solve it.It seems like the MudExpansionPanel is doing something that bug the MudButton.

It happens at (seemingly) random times while I test my app so I don't really know what caused it.

EDIT: It happens after exactly 8 interactions with a MudExpansionPanel. Doesn't matter which one, in which order, if it's the same or different ones, or if it's opening or closing a panel.

I'm using the latest version of both Blazor and MudBlazor.Here is the relevant code :

<MudExpansionPanels MultiExpansion="true">@foreach (var equip in equipement.ListEquipements){<MudExpansionPanel Text="@equip.Nom"><MudGrid><MudItem xs="4"><MudText>Id : @equip.EquipementId</MudText>                @if (equip.TypeCapteurId != null)                {<MudText>Type Capteur : @equip.TypeCapteurId</MudText>                }</MudItem><MudItem xs="4"><MudText>Px : @equip.PositionX</MudText><MudText>Py : @equip.PositionY</MudText><MudText>Pz : @equip.PositionZ</MudText></MudItem><MudItem xs="4"><MudText>Dx : @equip.DimensionX</MudText><MudText>Dy : @equip.DimensionY</MudText><MudText>Dz : @equip.DimensionZ</MudText></MudItem></MudGrid><div class="d-flex justify-end gap-2"><MudButton Variant="Variant.Filled" DropShadow="false" Color="Color.Default">Supprimer</MudButton><MudButton Variant="Variant.Filled" DropShadow="false" Color="Color.Primary">Modifier</MudButton></div></MudExpansionPanel>}

Viewing all articles
Browse latest Browse all 4839

Trending Articles



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