ui-grid
ui-grid copied to clipboard
Flexible Height Plugin Height Set Falls Short When Horizontal Scroll Present
The flexible height plugin does not appear to set the height large enough when the a horizontal scroll bar appears for a canvas that is wider than the view port.
This change fixed it for me.
In ng-flexible-height.js make the following changes.
Change line 13 from:
var extraHeight = self.grid.$topPanel.height() + $(footerPanelSel).height();
to
var extraHeight = self.grid.$topPanel.height() + $(footerPanelSel).height() + 3;
and after line 14 (where it initialises naturalHeight) add in the following:
if (self.grid.$canvas[0].scrollHeight > self.grid.$canvas.height())
{
// scroll bar shown
naturalHeight = self.grid.$canvas[0].scrollHeight + 1;
}
If the above isn't good as a stopgap, can you provide a plunker
Did not work for me so I had to add this after line 16:
// Horizontal scroll bar exists?
if(self.grid.$headerScroller.width() > self.grid.$headerContainer.width()){
// Yes, so increase the height
extraHeight += 17;
}