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

Grid 100% height is calculated wrongly within Angular Material app #5167

Closed
amrit-moomie opened this issue Jun 24, 2019 · 1 comment · Fixed by #5277
Closed

Grid 100% height is calculated wrongly within Angular Material app #5167

amrit-moomie opened this issue Jun 24, 2019 · 1 comment · Fixed by #5277
Assignees
Labels
🐛 bug Any issue that describes a bug 📉 regression 🧨 severity: medium version: 7.2.x version: 7.3.x version: 8.0.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@amrit-moomie
Copy link

amrit-moomie commented Jun 24, 2019

Description

After updating my Angular material app to version 7.3.5, all the grids are rendering with wrong height.
So far I have noticed this in my Angular material app only so I have created a shell app on stackblitz to reproduce this issue.
https://stackblitz.com/edit/infragistics-grid-height-issue

  • igniteui-angular version: 7.3.5
  • browser:

Steps to reproduce

  1. Open stackblitz running 7.3.4 https://stackblitz.com/edit/infragistics-grid-height-issue
  2. Grid will correctly render with 100% height
  3. Update package.json to 7.3.5.

Result

Grid height is wrongly calculated

Expected result

Grid height should be 100% to the available space.

Attachments

7.3.4

image

7.3.5

image

@amrit-moomie amrit-moomie added the 🐛 bug Any issue that describes a bug label Jun 24, 2019
@mpavlinov mpavlinov self-assigned this Jun 25, 2019
@ChronosSF
Copy link
Member

Thanks for the report!

The 7.3.4 implementation had issues of its own. You could load data in a way that makes the grid think you want to disable virtualization and crash your browser when loading thousands of records.

In the latest version this case hits a limitation where the grid tries to load in a hidden container therefore its height is 0. This causes it to auto-size (i.e tries to work like a content-box) which by default is rendering a body height of 10 records * their row height. We are planning to release a fix for such scenarios in the very near future.

If you need a quick workaround for an app you are building and you can't use 7.3.4, you could set the grid height to e.g. 99% on afterViewInit (or have it 99% by default then set it to 100%). This will stop it auto-sizing and instead force it to take the height of its parent container which is by then visible and its height available.

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.2.x version: 7.3.x version: 8.0.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
4 participants