-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Expandable grid display issues when rows are expanded #4508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
+1 |
Indeed, I can reproduce with a tall expandable row template. Heres a plunkr of the tutorial demo with a tall expandable row: |
The defect we're on here is with expandable, the code fragment you refer to is in infinite scroll. So I doubt the two are related - the features are quite independent of each other. |
Ok, so back to this today. Will post more soon. In my initial research, I see one value that jumps to a very invalid value, from a constant 14992 value, it jumps to -215 suddently (negative value) when scrolling past an expanded row. I'm graphing the values, and just by looking at the graph, I can tell when I've scrolled passed an expanded row. GridRenderContainer.js
I will graph other values and see what I get... |
I have graphed some variables and added the ability to tag events. We can clearly see the the parts where the yellow line (canvasHeight) jumps to a weird value when scrolling past the expanded row. This may be removing and adding it to the rowCache... but as you can see, there's two values it jumps to, so i'm thinking maybe it's both hitting and not hitting the if you want to debug with the same tool, I made it a project: tiny-graph |
Getting closer. I think there's an outstanding task to actually take height into account when determining the minRowsToRender... When I log if the rows have a height over 30 (row default height) it never logs true. So, the list is wrong, or the values are incorrect and do not include the expanded row's height. This is only one place... this may be lacking in other places, too....
|
I'm going nuts here... anyone know where the visibleRowCache is actually set? All I can find are references getting the value, but not setting it. Maybe i'm blind. |
Of course, I find it right after posting: |
|
My most recent finding I think this logic inside adjustRows should be inclusive of row height (including expanded rows). Currently, it seems to only decide the rendering range based on index/count and not height.
|
ah yes! Whilst scrolling past an expandable with height 1500PX, the tldr; there's a mismatch. the rendered rows are selected based on % of visible row count based on the scrollPercentage, which takes no account of height. |
Good news and bad news. Good news is, for basic cases, I have a solution for the expandable row miscalculation. The bad news is, this may be a systemic problem, and does NOT fix it if you also use infinite scroll because it has the same flawed assumption that rows are the same height. We need to compute the proper index based on scrollTop computed agains the actual row height, and not just the count: in
instead of
gets rid of the "jumping" at the end of the expandable row. I'm not sure how to adjust the end range, so just setting |
Header calculation was never updated after the changed to render containers. The headers should now be accounted for and viewports and scrollbars will size correctly based on viewport size.
…the Feature Infinite Scroll. fixes for angular-ui#5211 and angular-ui#4508
this is fixed with the PR by the way =) |
I notice this PR was entered back in 2016. I implemented this locally (dc183a1), and it seems to resolve the scrolling issue with expandable rows. What's required to get the changes into code? I see a 'help wanted' tag here... |
There was a scrolling bug: when the last row was expanded and the user scrolls, the expanded rows disappears. I found a fix here (angular-ui/ui-grid#4508) This commit will also change the angularjs version because ui-grid 3.1.1 doesn't support angularjs greater than 1.4.x
I am also facing same issues while integrating expandable in our grid. Do we have any work around or solution that can eliminate scroll issue. |
When you expand several top rows in the grid and scroll all the way down the grid is not painted properly. Just try Expandable Grid tutorial and you will see the problem. Seems like a scrolling issue but currently this feature is not much usable. You can see even bigger problem when you expand all rows. Now scrolling to the bottom exposes an empty flickering grid.
Seems like it is related to the virtualizationThreshold feature. If you make it equal to the number of rows in the main grid the issue goes away but with big datasets it is impractical as grid really slows to a crawl in that case.
The issue is in the GridRenderContainer.prototype.adjustRows method (expanded rows heights are not used for calculations) as well as in the uiGridViewport directive's controller() function:
var hiddenRowWidth = (rowContainer.currentTopRow) * rowContainer.grid.options.rowHeight;
Again, expanded row heights are not taken into consideration at all.
The text was updated successfully, but these errors were encountered: