Skip to content

Commit

Permalink
improve footer template in datagrid
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 committed Aug 16, 2024
1 parent 3108721 commit a7daccf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/LoreSoft.Blazor.Controls/Data/DataColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class DataColumn<TItem> : ComponentBase
public RenderFragment<TItem> Template { get; set; }

[Parameter]
public RenderFragment FooterTemplate { get; set; }
public RenderFragment<ICollection<TItem>> FooterTemplate { get; set; }

[Parameter]
public RenderFragment<QueryFilter> FilterTemplate { get; set; }
Expand Down
10 changes: 9 additions & 1 deletion src/LoreSoft.Blazor.Controls/Data/DataGrid.razor
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,20 @@
{
<tfoot>
<tr>
@if (DetailTemplate != null)
{
<td></td>
}
@if (Selectable)
{
<td></td>
}
@foreach (var column in VisibleColumns)
{
<td @key="column">
@if (column.FooterTemplate != null)
{
@column.FooterTemplate
@column.FooterTemplate(View)
}
</td>
}
Expand Down

0 comments on commit a7daccf

Please sign in to comment.