Files
IGP-Fan-Reference/Pages/Portals/EntityDialogPortal.razor
2026-06-04 12:07:14 -04:00

29 lines
487 B
Plaintext

@implements IDisposable;
@inject IEntityDialogService entityDialogService
@if (entityDialogService.HasDialog())
{
<EntityDialogComponent></EntityDialogComponent>
}
@code {
protected override void OnInitialized()
{
base.OnInitialized();
entityDialogService.Subscribe(OnUpdate);
}
void IDisposable.Dispose()
{
entityDialogService.Unsubscribe(OnUpdate);
}
void OnUpdate()
{
InvokeAsync(StateHasChanged);
}
}