gpt4 book ai didi

angular5 - 如何修复 Angular Material 2 中垫表水平滚动中的单列

转载 作者:行者123 更新时间:2023-12-02 03:35:32 30 4
gpt4 key购买 nike

我正在使用 Angular Material 2 和 Angular 5。我正在使用 mat-table。我想修复 mat-table 中的单个列。当我滚动水平条时,一列将固定并且不滚动。是否可以修复 mat-table 中的列。

Angular Material 2: mat-table link

最佳答案

来自material documentation :

It is also possible to fix cell columns to the start or end of the horizontally scrolling viewport. To do this, add the sticky or stickyEnd directive to the ng-container column definition.

这里是example

关于angular5 - 如何修复 Angular Material 2 中垫表水平滚动中的单列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50343145/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com