Neighbourhood.omg.lol/Components/StatusList.razor

24 lines
654 B
Text
Raw Normal View History

2024-06-13 00:26:43 +00:00
@inject State State
<Virtualize ItemsProvider="GetStatuses" Context="status" ItemSize="180">
2024-06-05 12:41:08 +00:00
<ItemContent>
<StatusCard status="@status"></StatusCard>
</ItemContent>
<Placeholder>
<StatusCardSkeleton></StatusCardSkeleton>
</Placeholder>
</Virtualize>
@code {
[Parameter]
public Func<ItemsProviderRequest, ValueTask<ItemsProviderResult<Status>>> StatusFunc { get; set; }
private async ValueTask<ItemsProviderResult<Status>> GetStatuses(ItemsProviderRequest request) {
return await this.StatusFunc(request);
}
2024-06-13 00:26:43 +00:00
protected override void OnInitialized() {
base.OnInitialized();
State.CurrentPage = Page.Status;
}
2024-06-05 12:41:08 +00:00
}