隐藏水平滚动条(角度ui-grid)

隐藏水平滚动条(角度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:

使用ui-grid常数禁用滚动条

更新: 选项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