Skip to content

Commit

Permalink
fix: table header layout improved
Browse files Browse the repository at this point in the history
  • Loading branch information
markuczy committed Nov 12, 2024
1 parent 488a4d8 commit 1ac1d87
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,10 @@
scrollHeight="flex"
[style]="tableStyle"
paginatorDropdownAppendTo="body"
tableStyleClass="h-full"
>
<ng-template pTemplate="header">
<tr>
<tr style="vertical-align: top">
<th style="width: 4rem" scope="col" *ngIf="selectionChangedObserved">
<p-tableHeaderCheckbox
*ngIf="allowSelectAll"
Expand All @@ -136,12 +137,15 @@
</ng-container>
<ng-container *ngFor="let column of columns">
<th *ngIf="column.sortable || column.filterable; else simpleHeader" scope="col">
<div class="table-header-wrapper">
<span id="{{column.id}}-header-name">{{ column.nameKey | translate }}</span>
<span class="icon-button-header-wrapper">
<div
class="table-header-wrapper flex flex-column justify-content-between align-items-start"
style="height: 100%"
>
<span class="flex" id="{{column.id}}-header-name">{{ column.nameKey | translate }}</span>
<span class="flex icon-button-header-wrapper">
<button
*ngIf="column.sortable"
class="pi sortButton"
class="pi sortButton pl-0"
[class.pi-sort-alt]="(column?.id === sortColumn && sortDirection === 'NONE') || column?.id !== sortColumn"
[class.pi-sort-amount-up]="column?.id === sortColumn && sortDirection === 'ASCENDING'"
[class.pi-sort-amount-down]="column?.id === sortColumn && sortDirection === 'DESCENDING'"
Expand Down

0 comments on commit 1ac1d87

Please sign in to comment.