enableHorizontalScrollbar enableVerticalScrollbar overwritted
This chunk of code doesn't seem to take in account the gridOption enableHorizontalScrollbar and enableVerticalScrollbar.
https://github.com/angular-ui/ng-grid/blob/1427a44ac06473d1107c15f869781d76273b238c/src/js/core/factories/GridRenderContainer.js#L722-L728
It override the scrolling property, causing to have verticalScrollbar even if I specify enableVerticalScrollbar = 0.
@swalters: I thought that we had it working for ALWAYS and NEVER, and it was just WHEN_NEEDED that didn't work?
please revert this commit and make when_needed work...
Because thats what is really needed especially for us.
There should not be any scrollbars when there it doesn't have to do anythnig, if i even go over the various tutorials:
http://ui-grid.info/docs/#/tutorial
then you see so many ugly scrollbars that shouldn't be shown in various examples...
+1
When using UI-Grid on Windows, ugly disabled scrollbars are present. This is due to scrollbars being turned on (I believe, because of pinned columns being next to it)
- Pinned columns have a 'Placeholder' instead of scrollbar and other columns will have the scrollbar
- In case if all columns are visible the horizontal scrollbar will be disabled but still be visible.
To remove the scroll when unnecessary suggesting changes done in ui-grid.
- ui-grid sets the css property as 'overflow: scroll', change that to 'overflow: auto'. This will not show the scroll unless required. /ui-grid/src/js/core/factories/GridRenderContainer.js (Line 778,779)
- Second change will be to have the placeholder in pinned columns only when the scrollbar is shown other columns. The function needsHScrollbarPlaceholder() again in GridRenderContainer.js (Line 741) decides if placeholder should show up by returning true/false.
It is not yet clear how to track if the function is called for pinned or other columns so as to have a condition in it to return true for pinned columns only if unpinned columns need a scrollbar.
@dlgski scrollbar's presence affects the width and height calculations so it's not just a simple matter of changing CSS. The code would have to query the DOM to ask if a scrollbar was present and it's something that will require a lot of refactoring to accomplish.