protected override async Task OnInitializedAsync()
{
SubscribeToAction<FetchSuccessAction1>(async action =>
{
formModel = action.entity with { };
StateHasChanged();
});
SubscribeToAction<CreateSuccessAction2>(async action =>
{
formModel = action.entity with { };
StateHasChanged();
});
SubscribeToAction<UpdateSuccessAction3>(action =>
{
formModel = action.entity with { };
StateHasChanged();
});
}
<fieldset class="xo-busy-spinner_container @Class" disabled=@IsBusy>
@ChildContent
@if (IsBusy)
{
<div class="xo-busy-spinner_obscurer">
<span class="xo-busy-spinner_spinner"></span>
</div>
}
</fieldset>
disabled=true
it also disables all controls inside it, buttons, inputs, everything
Action.Customer
into state if there are multiple pieces of state holding customer information so that, for example, fetching a Customer from the server with a name that has been updated will update existing state