fix(module: table): column title align incorrectly when filterable (#3023)

This commit is contained in:
James Yeung 2023-01-18 11:02:19 +08:00 committed by GitHub
parent 95a4628c6d
commit c35cd30f37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 81 additions and 82 deletions

View File

@ -42,6 +42,7 @@ else if (IsHeader && HeaderColSpan != 0)
}
<th class="@ClassMapper.Class" style="@FixedStyle @HeaderStyle" colspan="@HeaderColSpan">
<span class="ant-table-column-title">
@if (TitleTemplate != null)
{
@TitleTemplate
@ -50,6 +51,7 @@ else if (IsHeader && HeaderColSpan != 0)
{
@Title
}
</span>
</th>
}
else if (!IsHeader && RowSpan != 0 && ColSpan != 0)

View File

@ -51,13 +51,9 @@ else if (IsHeader && HeaderColSpan != 0)
{
@FilterToolTipSorter
}
else if (TitleTemplate != null)
{
@TitleTemplate
}
else
{
@Title
@ColumnTitle()
}
</th>
</CascadingValue>
@ -114,9 +110,9 @@ else if (IsBody && RowSpan != 0 && ColSpan != 0)
@code
{
RenderFragment SortHeader =>
@<Template>
<span class="ant-table-column-title">
RenderFragment ColumnTitle()
{
return @<span class="ant-table-column-title">
@if (TitleTemplate != null)
{
@TitleTemplate
@ -125,7 +121,12 @@ else if (IsBody && RowSpan != 0 && ColSpan != 0)
{
@Title
}
</span>
</span>;
}
RenderFragment SortHeader =>
@<Template>
@ColumnTitle()
@{
bool hasDescendingSorter = SortDirection.Descending.IsIn(SortDirections);
bool hasAscendingSorter = SortDirection.Ascending.IsIn(SortDirections);
@ -175,13 +176,9 @@ else if (IsBody && RowSpan != 0 && ColSpan != 0)
{
@ToolTipSorter
}
else if (TitleTemplate != null)
{
@TitleTemplate
}
else
{
@Title
@ColumnTitle()
}
<Dropdown Trigger="new[] { Trigger.Click }" Visible="_filterOpened" Placement="Placement.BottomRight" OnMaskClick="() => { if (_filterOpened) FilterConfirm(); }">