@inject IJSRuntime JS @inject State State @if(statuses != null) foreach(Status status in statuses) { } @code { [Parameter] public Func?>> StatusFunc { get; set; } [Parameter] public bool Editable { get; set; } = false; private List? statuses; protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); if (statuses == null || statuses.Count == 0) statuses = await StatusFunc(); await InvokeAsync(StateHasChanged); await JS.InvokeVoidAsync("removeElementById", "statusLoading"); } }