ant-design-blazor/components/table/Selection.razor
Hao Sun 78b10019e4 feat(module: table): add table virtualization (#2143)
* feat(module:table): virtualizing

* turn off virtualizing by default

* add document and demo

* NET_6_0 => NET6_0

* update table selection

* update Table.razor.cs

* update table files

* Update table files

* update table files

* update table files

* update table files

* update table files

* update table files

* update table files

* update Virtualizing.razor

* Update AntDesign.csproj

* Update TableRow.razor

* update files

* Update AntDesign.csproj

* update table files

* update Virtualizing.razor

* add DefaultExpandMaxLevel

* rename Virtualizing to EnableVirtualization

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2022-05-28 13:41:01 +08:00

62 lines
1.5 KiB
C#

@namespace AntDesign
@using AntDesign.TableModels
@inherits ColumnBase
@if (IsInitialize)
{
return;
}
else if (IsPlaceholder)
{
<td style="padding: 0px; border: 0px; height: 0px;"></td>
}
else if (IsMeasure)
{
<td style="padding: 0px; border: 0px; height: 0px;"><div style="height: 0px; overflow: hidden;">&nbsp;</div></td>
}
else if (IsColGroup)
{
if (Width != null)
{
<col class="ant-table-selection-col" style="width: @((CssSizeLength)Width); min-width: @((CssSizeLength)Width);">
}
else
{
<col class="ant-table-selection-col">
}
}
else if (IsHeader && HeaderColSpan != 0)
{
<th class="@ClassMapper.Class ant-table-selection-column" style="@FixedStyle @HeaderStyle" @key="@Key" colspan="@HeaderColSpan">
@if (Type == "checkbox")
{
<Checkbox Checked="Table.AllSelected" CheckedChange="OnCkeckedChange" Indeterminate="Indeterminate" />
}
</th>
}
else if (!IsHeader && RowSpan != 0 && ColSpan != 0)
{
<td class="@ClassMapper.Class ant-table-selection-column" style="@FixedStyle @Style" @key="@Key" rowspan="@RowSpan" colspan="@ColSpan">
@if (CellRender != null)
{
var cellData = new CellData(RowData);
@CellRender(cellData)
}
else if (ChildContent != null)
{
@ChildContent
}
else
{
@if (Type == "checkbox")
{
<Checkbox Checked="RowData.Selected" Disabled="Disabled" CheckedChange="OnCkeckedChange" />
}
else if (Type == "radio")
{
<Radio Checked="RowData.Selected" Disabled="Disabled" CheckedChange="OnCkeckedChange" TValue="bool" />
}
}
</td>
}