Files
IGP-Fan-Reference/Pages/Portals/ConfirmationDialogPortal.razor
T

25 lines
436 B
Plaintext

@implements IDisposable;
@inject IMyDialogService MyDialogService
<ConfirmationDialogComponent></ConfirmationDialogComponent>
@code {
protected override void OnInitialized()
{
base.OnInitialized();
MyDialogService.Subscribe(OnUpdate);
}
void IDisposable.Dispose()
{
MyDialogService.Unsubscribe(OnUpdate);
}
void OnUpdate()
{
InvokeAsync(StateHasChanged);
}
}