-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(module: table): column title align incorrectly when filterable (#…
- Loading branch information
1 parent
95a4628
commit c35cd30
Showing
2 changed files
with
81 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,82 +12,84 @@ else if (Hidden) | |
} | ||
else if (IsPlaceholder) | ||
{ | ||
<td style="padding: 0px; border: 0px; height: 0px;"></td> | ||
<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;"> </div></td> | ||
<td style="padding: 0px; border: 0px; height: 0px;"><div style="height: 0px; overflow: hidden;"> </div></td> | ||
} | ||
else if (IsColGroup) | ||
{ | ||
@if (AppendExpandColumn) | ||
{ | ||
<col class="ant-table-expand-icon-col"> | ||
} | ||
@if (AppendExpandColumn) | ||
{ | ||
<col class="ant-table-expand-icon-col"> | ||
} | ||
|
||
if (Width != null) | ||
{ | ||
<col style="width: @((CssSizeLength)Width); min-width: @((CssSizeLength)Width);"> | ||
} | ||
else | ||
{ | ||
<col /> | ||
} | ||
if (Width != null) | ||
{ | ||
<col style="width: @((CssSizeLength)Width); min-width: @((CssSizeLength)Width);"> | ||
} | ||
else | ||
{ | ||
<col /> | ||
} | ||
} | ||
else if (IsHeader && HeaderColSpan != 0) | ||
{ | ||
@if (AppendExpandColumn) | ||
{ | ||
<th class="ant-table-cell ant-table-row-expand-icon-cell"></th> | ||
} | ||
@if (AppendExpandColumn) | ||
{ | ||
<th class="ant-table-cell ant-table-row-expand-icon-cell"></th> | ||
} | ||
|
||
<th class="@ClassMapper.Class" style="@FixedStyle @HeaderStyle" colspan="@HeaderColSpan"> | ||
@if (TitleTemplate != null) | ||
{ | ||
@TitleTemplate | ||
} | ||
else | ||
{ | ||
@Title | ||
} | ||
</th> | ||
<th class="@ClassMapper.Class" style="@FixedStyle @HeaderStyle" colspan="@HeaderColSpan"> | ||
<span class="ant-table-column-title"> | ||
@if (TitleTemplate != null) | ||
{ | ||
@TitleTemplate | ||
} | ||
else | ||
{ | ||
@Title | ||
} | ||
</span> | ||
</th> | ||
} | ||
else if (!IsHeader && RowSpan != 0 && ColSpan != 0) | ||
{ | ||
@if (AppendExpandColumn) | ||
{ | ||
<td class="ant-table-cell ant-table-row-expand-icon-cell"> | ||
@if (Table.RowExpandable(RowData) && (!Table.TreeMode || !RowData.HasChildren)) | ||
{ | ||
<button type="button" @onclick="ToggleTreeNode" | ||
class="ant-table-row-expand-icon @(RowData.Expanded?"ant-table-row-expand-icon-expanded":"ant-table-row-expand-icon-collapsed")" | ||
aria-label="@(RowData.Expanded?Table.Locale.Collapse:Table.Locale.Expand)"></button> | ||
} | ||
</td> | ||
} | ||
@if (AppendExpandColumn) | ||
{ | ||
<td class="ant-table-cell ant-table-row-expand-icon-cell"> | ||
@if (Table.RowExpandable(RowData) && (!Table.TreeMode || !RowData.HasChildren)) | ||
{ | ||
<button type="button" @onclick="ToggleTreeNode" | ||
class="ant-table-row-expand-icon @(RowData.Expanded?"ant-table-row-expand-icon-expanded":"ant-table-row-expand-icon-collapsed")" | ||
aria-label="@(RowData.Expanded?Table.Locale.Collapse:Table.Locale.Expand)"></button> | ||
} | ||
</td> | ||
} | ||
|
||
<td class="@ClassMapper.Class" style="@FixedStyle @Style" rowspan="@RowSpan" colspan="@ColSpan" data-label="@Context.HeaderColumns[ColIndex].Title"> | ||
@if (ColIndex == Table.TreeExpandIconColumnIndex && Table.TreeMode) | ||
{ | ||
<span class="ant-table-row-indent [email protected]" style="padding-left: @((CssSizeLength)(RowData.Level * Table.IndentSize));"></span> | ||
@if (RowData.HasChildren) | ||
{ | ||
<button type="button" @onclick="ToggleTreeNode" class="ant-table-row-expand-icon @(RowData?.Expanded==true?"ant-table-row-expand-icon-expanded":"ant-table-row-expand-icon-collapsed")" aria-label="@(RowData?.Expanded==true?Table.Locale.Collapse:Table.Locale.Expand)"></button> | ||
} | ||
else | ||
{ | ||
<button type="button" class="ant-table-row-expand-icon ant-table-row-expand-icon-spaced" aria-label="@Table.Locale.Expand"></button> | ||
} | ||
} | ||
<td class="@ClassMapper.Class" style="@FixedStyle @Style" rowspan="@RowSpan" colspan="@ColSpan" data-label="@Context.HeaderColumns[ColIndex].Title"> | ||
@if (ColIndex == Table.TreeExpandIconColumnIndex && Table.TreeMode) | ||
{ | ||
<span class="ant-table-row-indent [email protected]" style="padding-left: @((CssSizeLength)(RowData.Level * Table.IndentSize));"></span> | ||
@if (RowData.HasChildren) | ||
{ | ||
<button type="button" @onclick="ToggleTreeNode" class="ant-table-row-expand-icon @(RowData?.Expanded==true?"ant-table-row-expand-icon-expanded":"ant-table-row-expand-icon-collapsed")" aria-label="@(RowData?.Expanded==true?Table.Locale.Collapse:Table.Locale.Expand)"></button> | ||
} | ||
else | ||
{ | ||
<button type="button" class="ant-table-row-expand-icon ant-table-row-expand-icon-spaced" aria-label="@Table.Locale.Expand"></button> | ||
} | ||
} | ||
|
||
@if (CellRender != null) | ||
{ | ||
var cellData = new CellData(RowData); | ||
@CellRender(cellData) | ||
} | ||
else | ||
{ | ||
@ChildContent | ||
} | ||
</td> | ||
@if (CellRender != null) | ||
{ | ||
var cellData = new CellData(RowData); | ||
@CellRender(cellData) | ||
} | ||
else | ||
{ | ||
@ChildContent | ||
} | ||
</td> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters