我想知道如何在Angular Material mat-table中仅为行显示垂直滚动条(标题不移动)。 当我在
mat-table
样式中设置overflow: auto
和max-height
时,整个表格(包括标题)都会被滚动。
感谢您的帮助。mat-table
样式中设置overflow: auto
和max-height
时,整个表格(包括标题)都会被滚动。
感谢您的帮助。你可以使用MatHeaderRowDef的sticky属性:
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>