@namespace AntDesign
@inherits AntDomComponentBase
@typeparam TItem
@if (!HidePagination && PaginationPosition.Contains("top"))
{
}
@if (ScrollY != null)
{
@colGroup(this)
@for (var i = 0; i < ColumnContext.Columns.Count; i++)
{
|
}
@body(this)
}
else
{
@colGroup(this)
@header(this)
@body(this)
}
@if (!HidePagination && PaginationPosition.Contains("bottom"))
{
}
@code
{
RenderFragment> header = table =>
@
@if (_fieldModel != null)
{
@table.ChildContent(_fieldModel)
}
@if (table.ScrollY != null)
{
|
}
;
RenderFragment> colGroup = table =>
@
@if (_fieldModel != null)
{
@table.ChildContent(Table._fieldModel)
}
@if (table.ScrollY != null)
{
}
;
RenderFragment> body = table =>
@
@if (table.ActualTotal <= 0)
{
|
}
else if (table.ShowItems != null && table.ColumnContext.Columns.Count > 0)
{
for (int i = 0; i < table.ShowItems.Count(); i++)
{
var rowIndex = table.PageSize * (table.PageIndex - 1) + i + 1;
var data = table.ShowItems.ElementAt(i);
var @checked = table._headerSelection?.RowSelections.ElementAtOrDefault(i)?.Checked ?? false;
@table.ChildContent(data)
}
}
;
}