Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: table header layout improved #595

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading