igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

igx-grid: Incorrect height calculation when setting height in percent and binding empty data.

Open tkiryu opened this issue 7 years ago • 5 comments

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

  1. 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

my-app.zip

tkiryu avatar Feb 19 '19 07:02 tkiryu

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.

mpavlinov avatar Feb 20 '19 19:02 mpavlinov

anyone coming here can use this code as a workaround to get 100% of the height [height]="grid.nativeElement.parentElement.offsetHeight+'px'"

LabDeve avatar Feb 22 '19 11:02 LabDeve

Hi, let me confirm. This fix hasn't been merged to 7.2.x yet. Is there any problem?

tkiryu avatar Apr 22 '19 04:04 tkiryu

@mpavlinov Will the fix make it in 7.2.x and master soon?

kdinev avatar Apr 22 '19 07:04 kdinev

@kdinev Yes.

mpavlinov avatar Apr 23 '19 10:04 mpavlinov