Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tkiryu opened this issue Feb 19, 2019 · 5 comments · Fixed by #4783
Closed
Assignees
Labels
🐛 bug Any issue that describes a bug 📉 regression 🧨 severity: medium version: 7.1.7 virtualization ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@tkiryu
Copy link

tkiryu commented Feb 19, 2019

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

@mpavlinov
Copy link
Contributor

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.

@LabDeve
Copy link

LabDeve commented Feb 22, 2019

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

kdinev added a commit that referenced this issue Feb 28, 2019
fix(grid): Fix calculate height when initially grid has no data #3950
kdinev added a commit that referenced this issue Feb 28, 2019
fix(grid): Fix calculate height when initially grid has no data #3950
@tkiryu
Copy link
Author

tkiryu commented Apr 22, 2019

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

@kdinev
Copy link
Member

kdinev commented Apr 22, 2019

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

@mpavlinov
Copy link
Contributor

@kdinev Yes.

ChronosSF pushed a commit that referenced this issue May 16, 2019
…#3972)

* fix(grid): Fix calculate height when initially grid has no data #3950

* test(grid): Fixing grid loading indicator test #3950

* fix(HierarchicalGrid): Additional fix for navigation when empty child is bigger than the viewport.

* test(grid): Solving a scenario where the grid height is in % #3950

* Merge master into mpavlov/issue-3950-master

* chore(*): Fixing wrong merge

* test(grid): HGrid remote LOD scenario shrinks the row islands #3950

* chore(*): Removing default height null for child layouts

* chore(*): Updating tests to reflect the new row-island default

* chore(*): Reverting the horizontal scroll visibility check

* chore(*): Reseting widths cache when columns get recalculated

* chore(*): New logic for row island height calculation
mpavlinov added a commit that referenced this issue May 16, 2019
fix(grid): Fix calculate height when initially grid has no data #3950
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Any issue that describes a bug 📉 regression 🧨 severity: medium version: 7.1.7 virtualization ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants