This commit is contained in:
mmrbnjd
2024-07-21 16:07:53 +03:30
parent d80e1706c9
commit d9fd29dbba
2 changed files with 13 additions and 57 deletions

View File

@@ -1,7 +1,7 @@
@using Shared.DTOs
<Modal @ref="modal" />
<Grid TItem="InvoiceItemDTO"
<Grid @ref="grid" TItem="InvoiceItemDTO"
AllowRowClick="true"
AllowSorting="true"
Class="table table-hover"
@@ -48,6 +48,7 @@
@code {
Grid<InvoiceItemDTO> grid = default!;
[Parameter] public int InvoiceID { get; set; }
[Parameter] public bool IsDeleted { get; set; }
[Parameter] public EventCallback<string> OnMultipleOfThree { get; set; }
@@ -60,6 +61,12 @@
return await Task.FromResult(request.ApplyTo(InvoiceItems));
}
protected override async Task OnParametersSetAsync()
{
if(grid != null)
await grid.RefreshDataAsync();
await base.OnParametersSetAsync();
}
private async Task OnRowClick(GridRowEventArgs<InvoiceItemDTO> args)
{
if (!IsDeleted)
@@ -99,7 +106,7 @@
// if (result.Status == ComponentStatus.success)
// await LoadCod(1);
// await modal.HideAsync();
await modal.HideAsync();
}
private IEnumerable<InvoiceItemDTO> GetInvoiceItems()
{