mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 05:27:37 +08:00
fix(module: table): column title align incorrectly when filterable (#3023)
This commit is contained in:
parent
95a4628c6d
commit
c35cd30f37
@ -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)
|
||||
|
@ -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(); }">
|
||||
|
Loading…
Reference in New Issue
Block a user