Neighbourhood.omg.lol/Components/PicList.razor

22 lines
698 B
Text

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