You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
519 B
31 lines
519 B
@implements IDisposable; |
|
|
|
@inject ISearchService searchService |
|
|
|
@if (searchService.IsVisible) |
|
{ |
|
<SearchDialogComponent></SearchDialogComponent> |
|
} |
|
|
|
@code { |
|
|
|
protected override void OnInitialized() |
|
{ |
|
searchService.Subscribe(OnUpdate); |
|
} |
|
|
|
protected override async Task OnInitializedAsync() |
|
{ |
|
await searchService.Load(); |
|
} |
|
|
|
public void Dispose() |
|
{ |
|
searchService.Unsubscribe(OnUpdate); |
|
} |
|
|
|
void OnUpdate() |
|
{ |
|
StateHasChanged(); |
|
} |
|
} |