ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

ui-grid auto-resize and flex-box layout together

Open xak2000 opened this issue 11 years ago • 21 comments

I want a flexbox layout with header, main content and footer . I choose a flexbox because it is very simple and straighforward solution. Key feature is main content block can be any height, but not less then 100% of remaining screen size. So if main content will be only one word then footer will still be at the bottom of the page. But if content will be big then footer will slide down off the screen.

For this to work I set css property min-height: 100% to .site class (container for header, main content and footer). And all works fine.

But when I put ui-grid with auto-resize module to main content's section it initially has a right size but every tick (250ms) increases it's size by 0.2 pixel. So the main content's section is growing all the time. Every 1 sec for 1 pixel.

This bug only appears if browser zoom is set to not 100% (110, 125, 150 etc). Try to open http://plnkr.co/edit/0jPhNxJlLF3VJeOvYh3u?p=preview and then press CTRL + to set zoom to 110-150%. Then rerun the plunkr. You will see the vertical scrollbar continiously growing.

I tested it in latest Chrome and Firefox. Both have this bug if zoom is not 100%.

You can try to uncomment height: 100%; css rule for the .site class and see this fix the problem. But now if we put any other content into main section (big enought for vertical scrolling) then our footer still be on screen. That is not what we want.

xak2000 avatar Mar 03 '15 22:03 xak2000

Hi. I also have a problem with the flex implemented. The container expands proper, but the grid doesn't. (set the grid display: none if you wanna check the containers) I have tried to add minRowsToShow: 1 -> it shows only one row. Also i tried with enableMinHeightCheck: false -> the grid overflows the container and renders all rows. Here is the plnkr: http://plnkr.co/edit/GpBygp8xQObrvYBnJVss?p=preview Thanks.

roedit avatar Apr 30 '15 07:04 roedit

I am facing similar issue. Grid show one or two rows at the start but then after 1s or 250 ms it continuously starts expanding southwards. Showing more rows. I have used minRowsToShow:17.

sahil-kapoor avatar Jun 04 '15 09:06 sahil-kapoor

I also have the same problem.

aaronpmishkin avatar Jun 17 '15 23:06 aaronpmishkin

Same issue here. A fix would be greatly appreciated.

JayHuang avatar Jun 18 '15 01:06 JayHuang

+1

alanstott avatar Jul 28 '15 15:07 alanstott

+1

andrea-vega avatar Aug 12 '15 20:08 andrea-vega

+1

jdwilliams15 avatar Aug 26 '15 20:08 jdwilliams15

+1

legendzlive avatar Sep 15 '15 06:09 legendzlive

+1

gbecan avatar Oct 08 '15 13:10 gbecan

+1

cmichaelgraham avatar Jan 04 '16 20:01 cmichaelgraham

+1

matheusgeres avatar Mar 10 '16 17:03 matheusgeres

+1

Ankurkh1 avatar Apr 01 '16 20:04 Ankurkh1

+1

rochejul avatar Apr 07 '16 07:04 rochejul

+1

ThCC avatar Jun 03 '16 14:06 ThCC

+1

DaVarga avatar Jun 14 '16 16:06 DaVarga

I believe I've found a fix for this issue where every tick (250ms) the grid increases its size by 0.2 pixel. Check out this plnkr: http://plnkr.co/edit/dcO2QNMgIbxLDoVryUzc?p=preview

That plnkr has the following small change to wait for a promise from refreshCanvas() in the refresh() method: https://github.com/elijahlofgren/ui-grid-fix-test/commit/e8b5217616cc33f4222d1f3342623662654b86ca

I'm planning to submit a proper PR but wanted to go ahead and post here right away in case others wanted to try the change as well and share whether it fixes the issue for them. Once I submit the PR I'll post the link to it here as well.

elijahlofgren avatar Sep 09 '16 16:09 elijahlofgren

I've filed a PR with the fix here: https://github.com/angular-ui/ui-grid/issues/5670

elijahlofgren avatar Sep 09 '16 17:09 elijahlofgren

Any info wether this might get merged in soon? :)

Tommatheussen avatar Oct 14 '16 16:10 Tommatheussen

We discovered this bug on a page on our production site. It looks bad. When will it get fixed?

lobo78 avatar Oct 20 '16 16:10 lobo78

Wow, people in charge have a way of showing they don't care. At least have the courtesy to respond in some fashion.

thujone avatar Nov 18 '16 01:11 thujone