Skip to content

Commit 13b637e

Browse files
committed
tweak datagrid header css
1 parent 5930d14 commit 13b637e

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

src/LoreSoft.Blazor.Controls/DataGrid.razor

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@
7878

7979
@if (column.Sortable && column.CurrentSortIndex >= 0)
8080
{
81-
<span class="data-grid-header-sort @(column.CurrentSortDescending ? "data-grid-header-sort-desc" : "data-grid-header-sort-asc" )"></span>
81+
<div class="data-grid-header-sort">
82+
<span class="@(column.CurrentSortDescending ? "data-grid-header-sort-desc" : "data-grid-header-sort-asc" )"></span>
83+
</div>
8284
}
8385

8486
@if (Filterable && column.Filterable)

src/LoreSoft.Blazor.Controls/Styles/_data.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,16 @@ button.data-grid-header-filter {
3232
cursor: pointer;
3333
background-color: transparent;
3434
border: 0 none;
35-
padding: 0.025rem 0.2rem;
35+
padding: 0;
3636
font: inherit;
3737
}
3838

39+
.data-grid-header-sort {
40+
display: flex;
41+
justify-content: center;
42+
align-items: center;
43+
}
44+
3945
.data-grid-header-sort-asc::before,
4046
.data-grid-header-sort-desc::before,
4147
.data-grid-header-filter-icon::before,

0 commit comments

Comments
 (0)