Grid with a width of 100% renders incorrectly
Description
A grid with a width of 100% renders incorrectly
- igniteui-angular version: 6.1.4
- browser: Chrome 68.0.3440.106
Steps to reproduce
- Open sample Live example
- Delete cache and reload
Result
The grid is rendered incorrectly
Expected result
The grid is rendered correctly
I think the issue is happening with the calculation of calcWidth. When you resize the window the issue is fixed, The width in that line is '100%' so the computed value is 100.
https://github.com/IgniteUI/igniteui-angular/blob/2b4de7324fbec2e10d1d6602b32fb11157eeab69/projects/igniteui-angular/src/lib/grid/grid.component.ts#L3330
Attachments
@lalo-mx By default, if you don't set any width to the grid, it would be sized at 100% and it wouldn't go through the sizing computation. Try removing the width from the container as a temporary fix.
Let us know if you have more questions, closing the issue for now.
Was the bug fixed?
I think this was closed by mistake. Reopening.
Yes, my mistake, @lalo-mx tommorow I will give you more detailed status of this issue.
@kdinev @zdrawku Whats the status on this for 6.2? Is it influenced by #2384 ? We have also had issues with the grid width. Also, any chance any of this could impact #1995 positively?
@Eralmidia and @lalo-mx there is an issue that describes the problem that @lalo-mx experienced, it is related to the height, but applies also to the width percent rendering. As I am familiar @ChronosSF is currently researching a way to render grid sizes based on the visible row data that the end user can set. @ChronosSF can you share more.
@zdrawku @Eralmidia The records-based rendering was pushed back and won't make it into 6.2.0.
@ChronosSF We should fix this issue, since we won't have the records-based rendering, because it's a chore for users right now.
Just for clarification width in % is always defined as the browser window has width in pixels to derive % width from. So this does not fall into the same loophole we were trying to resolve with #2384
This looks like a bug that we should fix, yes.
@lalo-mx , are you still able to reproduce the issue with the sample that is linked?
We did have an issue with 100% being used as 100 pixels for calculations but it seems to have been fixed prior to 6.1.4 release.
Yes, it looks the sample is working now but i have no idea what changed. Maybe a Chrome related bug or StackBlitz. In our app the bugs it is still happening but i have not found the difference between the sample and our code.
I am having problems to use StackBlitsz due to https://github.com/IgniteUI/igniteui-angular/issues/2814. Any estimate of a new release with the fix?
All StackBlitz demos are up and running. @lalo-mx could you let us know if the issue still persist after upgrading to igniteui-angular 6.2.0?
@lalo-mx closing this one if there is still an issue please reopen it :)