Angular2 使第一个 table 列静态(为此插件)

Angular2 make first table column static (plugin for this)

有谁知道 Angular2 的插件,您可以在其中固定或静态化整个第一列,同时让其他列保持水平滚动,我已经尝试过 css 位置但没有成功.

我看到 angular.js 和 jquery 有很多插件可以实现这个,但是 none 我可以找到 angular2

我使用了这个解决方案,它对我有用。

 .mat-table > mat-header-row:first-child > mat-header-cell:first-child, mat-cell:first-child {
  position: absolute;
  display: flex;
  background-color: white;
  width: 150px;
  min-height: 42px;
  left: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  align-items: center;
  padding: 0 24px;
  margin-top: 4px;
}

.mat-table > mat-header-row:first-child > mat-header-cell:first-child {
  border-bottom: 0;
  margin-top: 0;
}

.mat-table > mat-header-row:nth-child(2) > mat-header-cell:nth-child(2), mat-cell:nth-child(2) {
  margin-left: 160px;
}

您可能需要根据需要调整边框和内边距。