Skip to content

Commit

Permalink
Update Table Header position
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcibotari committed Nov 22, 2024
1 parent 8befc44 commit ec045da
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/app/features/admin/spaces/spaces.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</button>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
</mat-table>
<mat-paginator></mat-paginator>
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/admin/users/users.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
</button>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
</mat-table>
<mat-paginator></mat-paginator>
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/spaces/assets/assets.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
<!-- </ng-container>-->

<!-- <mat-header-row *matHeaderRowDef="['actions']"></mat-header-row>-->
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row>
<mat-row
*matRowDef="let row; columns: displayedColumns"
(click)="onRowSelect(row)"
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/spaces/contents/contents.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
<!-- </ng-container>-->

<!-- <mat-header-row *matHeaderRowDef="['actions']"></mat-header-row>-->
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns" (click)="onRowSelect(row)"></mat-row>
</mat-table>
<mat-paginator></mat-paginator>
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/spaces/schemas/schemas.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
</div>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns" (click)="onRowSelect(row)"></mat-row>
</mat-table>
<mat-paginator></mat-paginator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</button>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
</mat-table>
<mat-paginator></mat-paginator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</button>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
</mat-table>
<mat-paginator></mat-paginator>
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/spaces/tasks/tasks.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
</button>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
</mat-table>
<mat-paginator></mat-paginator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ <h2 mat-dialog-title>Contents</h2>
</mat-cell>
</ng-container>
<ng-container matColumnDef="name">
<mat-header-cell *matHeaderCellDef mat-sort-header="name"> Name</mat-header-cell>
<mat-header-cell *matHeaderCellDef> Name</mat-header-cell>
<mat-cell *matCellDef="let element">
{{ element.name }}
</mat-cell>
</ng-container>
<ng-container matColumnDef="slug">
<mat-header-cell *matHeaderCellDef mat-sort-header="slug"> Slug</mat-header-cell>
<mat-header-cell *matHeaderCellDef> Slug</mat-header-cell>
<mat-cell *matCellDef="let element"> {{ element.slug }}</mat-cell>
</ng-container>
<ng-container matColumnDef="schema">
<mat-header-cell *matHeaderCellDef mat-sort-header="schema"> Schema</mat-header-cell>
<mat-header-cell *matHeaderCellDef> Schema</mat-header-cell>
<mat-cell *matCellDef="let element">
@if (element.kind === 'DOCUMENT') {
@if (schemasMapById().get(element.schema); as schema) {
Expand All @@ -64,18 +64,18 @@ <h2 mat-dialog-title>Contents</h2>
</mat-cell>
</ng-container>
<ng-container matColumnDef="updatedAt">
<mat-header-cell *matHeaderCellDef mat-sort-header="updatedAt"> Updated At</mat-header-cell>
<mat-header-cell *matHeaderCellDef> Updated At</mat-header-cell>
<mat-cell *matCellDef="let element" [matTooltip]="element.updatedAt?.toDate() | date: 'medium'">
{{ element.updatedAt?.toDate() | date: 'mediumDate' }}
</mat-cell>
</ng-container>

<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns" (click)="onRowSelect(row)"></mat-row>
</mat-table>
<mat-paginator></mat-paginator>
</mat-dialog-content>
<mat-dialog-actions align="end">
<mat-paginator></mat-paginator>
<button mat-button [mat-dialog-close]="undefined">Close</button>
<button mat-stroked-button color="primary" [mat-dialog-close]="selection.selected" [disabled]="selection.isEmpty()">
@if (selection.selected.length > 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ table {
width: 100%;
}

mat-dialog-content {
@apply pt-0 #{!important};
}

mat-row {
cursor: pointer;
}
Expand Down

0 comments on commit ec045da

Please sign in to comment.