Files
IGP-Fan-Reference/Web/Portals/GlossaryDialogPortal.razor
T

29 lines
487 B
Plaintext

@implements IDisposable;
@inject IGlossaryDialogService glossaryDialogService
@if (glossaryDialogService.HasDialog())
{
<GlossaryDialogComponent></GlossaryDialogComponent>
}
@code {
protected override void OnInitialized()
{
base.OnInitialized();
glossaryDialogService.Subscribe(OnUpdate);
}
void IDisposable.Dispose()
{
glossaryDialogService.Unsubscribe(OnUpdate);
}
void OnUpdate()
{
StateHasChanged();
}
}