Neighbourhood.omg.lol/Components/PicList.razor

23 lines
698 B
Text
Raw Normal View History

2024-06-07 04:25:21 +00:00
@inject IJSRuntime JS
<Virtualize ItemsProvider="GetPics" Context="pic" ItemSize="500">
2024-06-05 12:41:08 +00:00
<ItemContent>
2024-06-07 04:25:21 +00:00
<PicCard Pic="@pic" Editable="@Editable" Dialog="@Dialog"></PicCard>
2024-06-05 12:41:08 +00:00
</ItemContent>
<Placeholder>
2024-06-07 04:25:21 +00:00
<article class="no-padding center" style="min-height:500px;"></article>
2024-06-05 12:41:08 +00:00
</Placeholder>
</Virtualize>
@code {
[Parameter]
public Func<ItemsProviderRequest, ValueTask<ItemsProviderResult<Pic>>> PicsFunc { get; set; }
2024-06-07 04:25:21 +00:00
[Parameter]
public bool Editable { get; set; } = false;
[Parameter]
public EditPicDialog? Dialog { get; set; }
2024-06-05 12:41:08 +00:00
private async ValueTask<ItemsProviderResult<Pic>> GetPics(ItemsProviderRequest request) {
return await this.PicsFunc(request);
}
}