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

Grid with a width of 100% renders incorrectly

Open lalo-mx opened this issue 8 years ago • 13 comments

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

  1. Open sample Live example
  2. 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

Example image angular-mwzuvp.zip

lalo-mx avatar Aug 24 '18 21:08 lalo-mx

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

kdinev avatar Aug 27 '18 05:08 kdinev

Let us know if you have more questions, closing the issue for now.

zdrawku avatar Oct 01 '18 14:10 zdrawku

Was the bug fixed?

lalo-mx avatar Oct 01 '18 15:10 lalo-mx

I think this was closed by mistake. Reopening.

kdinev avatar Oct 01 '18 15:10 kdinev

Yes, my mistake, @lalo-mx tommorow I will give you more detailed status of this issue.

zdrawku avatar Oct 01 '18 15:10 zdrawku

@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 avatar Oct 30 '18 10:10 Eralmidia

@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 avatar Oct 30 '18 12:10 zdrawku

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

kdinev avatar Oct 30 '18 13:10 kdinev

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.

ChronosSF avatar Oct 30 '18 13:10 ChronosSF

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

ChronosSF avatar Oct 31 '18 16:10 ChronosSF

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?

lalo-mx avatar Oct 31 '18 18:10 lalo-mx

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?

zdrawku avatar Nov 07 '18 12:11 zdrawku

@lalo-mx closing this one if there is still an issue please reopen it :)

SlavUI avatar Dec 04 '18 13:12 SlavUI