Sorting and Searching Working
continuous-integration/drone/push Build is passing Details

Projet
Dorian HODIN 3 years ago
parent 219ee4c7c0
commit 416550e75d

Binary file not shown.

@ -6,13 +6,12 @@
<DataGrid TItem="Item"
Data="@items"
ReadData="@OnReadData"
TotalItems="@totalItem"
TotalItems="8"
PageSize="8"
Filterable
ShowPager
Responsive>
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="@Localizer["Image"]" Filterable="false">
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="@Localizer["Image"]" Filterable="false" Sortable="false">
<DisplayTemplate>
@if (!string.IsNullOrWhiteSpace(context.ImageBase64))
{
@ -20,8 +19,8 @@
}
</DisplayTemplate>
</DataGridColumn>
<DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)" Caption="@Localizer["Nom"]" Filterable="true"/>
<DataGridColumn TItem="Item" Field="@nameof(Item.StackSize)" Caption="@Localizer["Stack"]" Filterable="false" />
<DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)" Caption="@Localizer["Nom"]"/>
<DataGridColumn TItem="Item" Field="@nameof(Item.StackSize)" Caption="@Localizer["Stack"]" Filterable="false" Sortable="false"/>
</DataGrid>
</div>

@ -64,19 +64,6 @@ namespace ProjetBlazor.Components
public IModalService Modal { get; set; }
public object Action { get; internal set; }
private async Task OnReadData(DataGridReadDataEventArgs<Item> e)
{
if (e.CancellationToken.IsCancellationRequested)
{
return;
}
if (!e.CancellationToken.IsCancellationRequested)
{
items = await DataService.List(e.Page, e.PageSize);
totalItem = await DataService.Count();
}
}
protected override async Task OnInitializedAsync()
{
items = await DataService.getAll();

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save