ant-design-blazor/components/table/SummaryRow.razor
James Yeung 1181673273 feat(module: table): add summary (#1218)
* feat(module: table): add summary row

* feat: add fixed summary cell
2021-03-31 19:02:57 +08:00

32 lines
570 B
C#

@namespace AntDesign
@if (IsSummary)
{
<tr>@ChildContent</tr>
}
@code{
[CascadingParameter]
private ITable Table { get; set; }
[CascadingParameter(Name = "IsInitialize")]
private bool IsInitialize { get; set; }
[CascadingParameter(Name = "IsSummary")]
private bool IsSummary { get; set; }
[Parameter]
public RenderFragment ChildContent { get; set; }
protected override void OnInitialized()
{
base.OnInitialized();
if (IsInitialize)
{
Table.AddSummaryRow(this);
}
}
}