Skip to content

Commit 56161fb

Browse files
committed
chore: table component sticky header
1 parent 787ae12 commit 56161fb

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/app/shared/components/template/components/table/table.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<td mat-cell *matCellDef="let element">{{ element[column] }}</td>
66
</ng-container>
77

8-
<tr mat-header-row *matHeaderRowDef="columnsToDisplay"></tr>
9-
<tr mat-row *matRowDef="let myRowData; columns: columnsToDisplay"></tr>
8+
<tr mat-header-row *matHeaderRowDef="columnsToDisplay; sticky: true"></tr>
9+
<tr mat-row *matRowDef="let row; columns: columnsToDisplay"></tr>
1010
</table>
1111
</div>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
.table-container {
22
width: 100%;
3-
overflow-y: scroll;
3+
max-height: 80vh;
4+
overflow: auto;
5+
6+
tr[mat-header-row] {
7+
background-color: var(--ion-background-color);
8+
}
49
}

0 commit comments

Comments
 (0)