Sticky header md-table-container angular js materi

2019-07-20 02:46发布

table-container to display records. I have a requirement, when table reaches to top of the screen it's header stick to top. Please guide me to implement this requirement.

For example see this link http://angular-data-grid.github.io/demo/fixed-header/angular-md-grid.html#!?page=1&itemsPerPage=75

Thank you, Java4you.

1条回答
我命由我不由天
2楼-- · 2019-07-20 03:30

Using the Angular Material table, adding the following to the .scss file for the containing component will now achieve this, but not in IE unfortunately:

.mat-header-row {
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  background-color: inherit;
}

See this for discussion.

查看更多
登录 后发表回答