Hiding and styling scrollbars
I've been unable to hide the horizontal scroll bar, is it possible hide scroll bars via grid options? In addition, is it possible to style the scroll bars?
- Yes, you can disable both scrollbars with this option: http://ui-grid.info/docs/#/api/ui.grid.class:GridOptions#enableScrollbars If you want to conditionally disable the horizontal scrollbar you'd need to create a custom uiGridRenderContainer template and update the
ng-iffor the horizontal one. - The scrollbars are native to the browser. Any styling is dependent on what you can do to normal browser scrollbars.
I went ahead and made you a plunker: http://plnkr.co/edit/iamivj2m1mEZGsmyeppD?p=preview
Although this works, it seems like a bit of a hack because you need to override ui-grids layout in your html as well as adds complexity. Alternatively this appears as if it could be added native within ui-grid's api.
Any chance you'll add a simpler native support for this? Horizontal scroll bars are a visual blunder especially when the horizontal scrollbar is disabled. I'd like to disable them for all of my grids which isn't really future proof.
I think this could be a useful feature, and since @c0bra has provided a comprehensive plunker, may be something I'm able to add. I'll give it a go (but probably not this week, so if someone else wants to take it on that's good too)
what i miss is that i want both scrollbars only to be visible when needed..
So i expect that the enabledScrollbars is not a boolean but can have multiply values like:
"never" "always" "when needed"
and maybe have extra options so that you can target the vertical and horizontal individually? (so more like a bitset)
There is already an open issue for automatically hiding the scrollbars when they are not needed. See #1618
It would be useful feature this as I would like to disable the horizontal scrolling but keep the vertical scrolling as is.
Looking forward to the feature being implemented.
I think all the scrollbar logic has changed substantially, so I'm putting this back into the pool.
sigh
Any plans to allow scrollbar style customization (outside of what's supported by the browser)?
👍 On allowing styling of scrollbars or at least a tutorial on how to do it.
In the past, you would bring in usually a Jquery Scrollbar container and hook it up to the element container but I'm not sure if that's even possible with angularjs.
@nkoterba,
Here is example how to modify html & less to get styled scrollbars: #5951
Here is example how to stlye scrollbar without modification in ui-grid: https://jsfiddle.net/mobichel/qpnfL06n/4/
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. If you believe that this is still an issue in the latest version, feel free to re-open it. Thank you for your contributions.