隐藏水平滚动条(Angular ui-grid) [英] Hide horizontal scrollbar (Angular ui-grid)
问题描述
我试图隐藏 Angular ui-grid 的水平滚动条,但我找不到正确的属性.(属性 enableScrollbars=false 删除了两者.)
是否可以只删除水平滚动条?
I'm trying to hide the horizontal scrollbar of a Angular ui-grid, but I can't find the right property. (Property enableScrollbars=false removes both.)
Is it possible to remove only the horizontal scrollbar?
推荐答案
使用 Github v3.0.0-rc.16 上的最新版本,您可以分别禁用水平和垂直滚动条.而不是
With the latest version on Github v3.0.0-rc.16 you can disable horizontal and vertical Scrollbar separately. Instead of
enableScrollbars = false;
使用
enableHorizontalScrollbar = value;
enableVerticalScrollbar = value;
与
value = 0; /* NEVER */
value = 1; /* ALWAYS */
value = 2; /* WHEN_NEEDED */
更新:如果您想使用常量而不是整数值,请查看相应的帖子:
UPDATE: If you want to use constants instead of the integer-value, look at corresponding post:
更新:选项 WHEN_NEEDED 目前似乎不可用.可能会再次更改,请在源代码中查找可用常量.
UPDATE: The option WHEN_NEEDED doesn't seem to be available at the moment. Maybe this will be changed again, so please look for the available constants in the source code.
常量定义在
https://github.com/angular-ui/ui-grid/blob/master/packages/core/src/js/constants.js
这篇关于隐藏水平滚动条(Angular ui-grid)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!