Igniteui-angular: igx-grid - setting height in percent doesn't work when the sum height of all rows is lower than parent height

Created on 3 Jul 2018  路  8Comments  路  Source: IgniteUI/igniteui-angular

Steps to reproduce

  1. Go to https://stackblitz.com/edit/igx-grid-height-in-percent

Result

Although height is set in percent, the sum height of all rows is taken priority. If the height is set in pixel, there is no problem.
image

Expected result

When height is specified no matter what it is pixel or percent, it should be taken priority over the sum height of all rows.

bug general low resolved

Most helpful comment

Actually it is probably caused by the same logic that causes #1861

All 8 comments

I believe this issue is related to #1767. I will verify later today.

Actually it is probably caused by the same logic that causes #1861

@ChronosSF I tested and it's reproducible with latest dev. I would consider it low severity.

@kdinev, actually this works according to spec https://github.com/IgniteUI/igniteui-angular/wiki/igxGrid-Specification#auto-sizing . It's the result of the following two rules:

  • if rowHeight * rowCount < height then set height = null.
  • null - the grid should grow vertically according to it's content, making all the content visible and not displaying a scrollbar in its container.

@ChronosSF Hmm, I thought in this scenario height is 100%. I guess this was before the "new" definition of height=null.

@kdinev , so what do you think? Should we change the spec and change the behavior or leave it as is.

@ChronosSF Well, I guess if the developer wants to have an empty space in the grid, when data is no loaded, for example, then they should be able to achieve it.

@tkiryu Is this issue still relevant? We're considering putting it in development.

Was this page helpful?
0 / 5 - 0 ratings