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

Rows randomly not rendered

Open rschooley opened this issue 12 years ago • 15 comments

This is occurring in 2.0.7.

Sometimes (4/5 times) not all rows are added to the grid. They are missing from the markup, however the height of the canvas is calculated correctly. Resizing the browser results in the missing items being added.

Given a data source of 10 rows, maybe 5 are shown, the other 5 are not in the markup. Resizing then adds the remainder of the rows.

rschooley avatar Dec 03 '13 14:12 rschooley

Can you create a plunker that replicates this?

roblarsen avatar Dec 03 '13 16:12 roblarsen

I can't reproduce the rows being added to the markup after a resize, but I can reproduce some rows not being rendered even though the scroll bar looks "right".

I have 41 rows, or 25 rows, and only the first 15 get rendered, even if you sort by different columns.

I'll see if I can make a plunker.

mark0978 avatar Dec 17 '13 05:12 mark0978

Yeah I see this issue as well.

buggtb avatar Jan 16 '14 15:01 buggtb

Have you found a way to replicate it? I've tried all sorts of things in plnkr to no effect, but I see it on two of my app pages.

On Thu, Jan 16, 2014 at 9:24 AM, Tom Barber [email protected]:

Yeah I see this issue as well.

— Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/ng-grid/issues/860#issuecomment-32478019 .

mark0978 avatar Jan 16 '14 17:01 mark0978

Here is my plunkr http://plnkr.co/edit/tOVUYir0uabgnkWl3Fnc?p=preview But as of right now , it does not reproduce this problem.

In app I have 5 grids on the same page, only 1 of those grids produces this problem. 3 of the grids are too short to know if they would produce it, but the 4th grid is longer (with fewer columns) than the grid with the issue.

mark0978 avatar Jan 16 '14 18:01 mark0978

@buggtb Can you tell me the characteristics of your grid that exhibits this problem? Mine has about 35-50 rows, a 2 cellFilter's for a date(with time). About 7 columns. Loaded in response to a selection from a different grid. Is a drop target for cells from another grid. Anything in common with your grid that shows this problem?

mark0978 avatar Jan 17 '14 02:01 mark0978

I haven't been able to see where in the diff the fix is, but branch 2.0.8 appears to have fixed this problem as of today when I loaded it. The built diff is pretty substantial, so the where/why of it still eludes me. but it now appears to be solved.

mark0978 avatar Mar 02 '14 15:03 mark0978

I ran into this exact same problem. It only occurred with 51+ rows in the grid. The problem is resolved by setting the virtualizationThreshold configuration option to be equal to or greater than the number of rows you want to display. The default value of this property is 50.

https://github.com/angular-ui/ng-grid/wiki/Configuration-Options

lwalden avatar Aug 20 '14 16:08 lwalden

@lwalden is this with v2.0.12? Are you setting an explicit height on your grid element?

Setting the virtualizationThreshold higher than your row count effectively disables virtualization, and any performance gains you would have received from it.

c0bra avatar Aug 20 '14 16:08 c0bra

looks like v2.0.11 is the version I'm using. Yes, there is a max-height set on the grid element that kicks in around 25 rows.

lwalden avatar Aug 20 '14 17:08 lwalden

@lwalden thanks a ton for pointing this out.

I was tearing out my hair here, loading 30ish rows of csv content into a grid instance and only seeing 4 (!?) rows render. I thought, surely some are just hiding behind the "viewport" limits or whatever, but no, 4 rows in the DOM.

I'm on 3.0.6 and the default is 20 for virtualizationThreshold, which I'm still not completely clear on, though I have looked over the source briefly.

Anyway somehow this was only affecting us in Firefox at first, until we stripped away some options or other that revealed the issue across browsers. (not sure why Firefox was behaving differently yet, just happy to be moving forward again)

I'm sure I'll be returning to this property again to get a better understanding, but just wanted to say thanks as this would have been a showstopper for us.

thynctank avatar Oct 27 '15 20:10 thynctank

@lwalden thanks for the tip this fixed the problem

thefewminutes avatar Sep 07 '16 21:09 thefewminutes

Thanks @lwalden , I had a same issue in my app. You fix worked for me too.

vpgayakwad avatar Jan 17 '17 09:01 vpgayakwad

Thanks @lwalden this worked for me too

emanuel-virca avatar Feb 10 '17 10:02 emanuel-virca

I have a issue that the scenario is: has two grids, one has only one column with custom cell template with a custom html with all necessary classes to ui-grid work.

when access the page that has this two grids, wait 5 sec, and click on tab that have this grid that I have mentioned, data isn't showed util I resize the window (browser). Curiously, if I click on the tab before this 5 sec, the data is showed properly.

I have tried all kind of solution and nothing works. Any one passed by this?

odravison avatar Aug 04 '17 15:08 odravison