ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Hiding and styling scrollbars

Open bgaisford opened this issue 12 years ago • 15 comments

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?

bgaisford avatar Oct 09 '14 00:10 bgaisford

  1. 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-if for the horizontal one.
  2. The scrollbars are native to the browser. Any styling is dependent on what you can do to normal browser scrollbars.

c0bra avatar Oct 09 '14 13:10 c0bra

I went ahead and made you a plunker: http://plnkr.co/edit/iamivj2m1mEZGsmyeppD?p=preview

c0bra avatar Oct 09 '14 13:10 c0bra

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.

keeper3000 avatar Oct 13 '14 16:10 keeper3000

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)

PaulL1 avatar Oct 13 '14 20:10 PaulL1

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)

jcompagner avatar Oct 15 '14 11:10 jcompagner

There is already an open issue for automatically hiding the scrollbars when they are not needed. See #1618

wattsbn avatar Oct 15 '14 14:10 wattsbn

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.

mohammedshafiq avatar Oct 28 '14 09:10 mohammedshafiq

I think all the scrollbar logic has changed substantially, so I'm putting this back into the pool.

PaulL1 avatar Feb 28 '15 07:02 PaulL1

sigh

bgaisford avatar Jun 20 '15 04:06 bgaisford

Any plans to allow scrollbar style customization (outside of what's supported by the browser)?

yorch avatar Jan 21 '16 17:01 yorch

👍 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 avatar Jun 14 '16 19:06 nkoterba

@nkoterba,

Here is example how to modify html & less to get styled scrollbars: #5951

mobichel avatar Jan 17 '17 12:01 mobichel

Here is example how to stlye scrollbar without modification in ui-grid: https://jsfiddle.net/mobichel/qpnfL06n/4/

mobichel avatar May 12 '17 12:05 mobichel

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.

stale[bot] avatar May 23 '18 05:05 stale[bot]

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.

stale[bot] avatar Jun 22 '18 06:06 stale[bot]