igx-grid: Incorrect height calculation when setting height in percent and binding empty data.
Description
There is a problem with height calculation when setting height in percent and binding empty data.
- igniteui-angular version: 7.1.7
- browser: N/A
Steps to reproduce
- Run the attached sample.
Result
Although I set igx-grid height to 100%, igx-grid doesn't fit to its parent.
Expected result
igx-grid should fit to its parent.
Attachments
This is related to issue #3949. The cause is the same. The grid miscalculates its height so it set it to null, which means no virtualization. The faulty code is in _derivePossibleHeight method.
anyone coming here can use this code as a workaround to get 100% of the height
[height]="grid.nativeElement.parentElement.offsetHeight+'px'"
Hi, let me confirm. This fix hasn't been merged to 7.2.x yet. Is there any problem?
@mpavlinov Will the fix make it in 7.2.x and master soon?
@kdinev Yes.