Angular Material Table spitted headers 添加了sticky header 功能 [英] Angular Material Table spitted headers add the sticky header functions
问题描述
我有吐痰的标题角材料表,我正在寻求帮助以添加粘性标题.
我尝试使用 sticky: true 但不知何故它不适用于我的第一列(因为我隐藏了该列.)以及第一行.它显示的是第二行.
下面是我的桌子
当我使用下拉菜单时,只有这些标题会比其他标题具有粘性.
下面是我的stackblitz.
https://stackblitz.com/edit/angular-bklajw-5foa62
要使顶部标题具有粘性,还要在其中添加粘性标签.它还将修复第一列粘性问题.
</tr>演示>
I am having the spitted header angular material table and I was looking for help to add the sticky header.
I have tried to using sticky: true but somehow it is not working for my first column (as I am hiding the column.) And for the first rows. It is showing the second row.
Below is my table
When I go with the dropdown only these headers get sticky behavior than others.
Below is my stackblitz.
https://stackblitz.com/edit/angular-bklajw-5foa62
解决方案 To make the top header sticky add sticky tag in that as well. It will also fixed first column sticky issue.
<tr mat-header-row
*matHeaderRowDef="['header-row-first-group','header-row-sec-group','header-row-third-group','header-row-forth-group','header-row-fifth-group'];sticky:true">
</tr>
这篇关于Angular Material Table spitted headers 添加了sticky header 功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文
登录
关闭
扫码关注1秒登录
发送“验证码”获取
|
15天全站免登陆