igx-grid - should use document.documentElement.clientHeight instead of screen.height to get viewport height.
Description
I just want to let you know that there is an incorrect code in a logic calculating grid height.
Result
screen.height is not viewport height.
https://github.com/IgniteUI/igniteui-angular/blob/master/projects/igniteui-angular/src/lib/grid/grid.component.ts#L933
Please refer to the following link. https://www.quirksmode.org/mobile/viewports.html
So this code would lead to wrong result in calculating grid height when grid parent height is not specified.
Expected result
document.documentElement.clientHeight should be used instead.
const viewPortHeight = document.documentElement.clientHeight;
Actually I was not able to reproduce a situation where element.clientHeight would return null or undefined to verify how the fix works.
@hanastasov, here is a sample.
https://stackblitz.com/edit/igx-grid-calc-height-using-screen-height
GridComponent is just wrapping igx-grid. This is the situation.
When it is rendered in DOM, render tree is as below.
<app-grid>
<igx-grid></igx-grid>
</app-grid>
app-grid is a host element, which is inline element by default. So its width and height is zero.
if (!this.nativeElement.parentNode.clientHeight) {
As a result, the if-condition becomes true.
https://stackoverflow.com/questions/48940252/angular-component-host-element-width-and-height-are-0