angular-ui/ui-grid

Wrong columns rendered after reload of gridOptions.data

Open

#3 519 ouverte le 17 mai 2015

Voir sur GitHub
 (2 commentaires) (0 réactions) (0 assignés)JavaScript (2 496 forks)batch import
help wantedtype: bug

Métriques du dépôt

Stars
 (5 395 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

If you have a wide table with a lot of columns and a horizontal scrollbar, and you scroll all of the way to the right of that table and update the data backing the grid, the wrong columns get rendered. Example: http://plnkr.co/m9dWODm9cqqzscPY09L1. It appears to chop off the last few columns until you adjust the scrollbar to move slightly to the left.

I think it's because GridRenderContainer miscalculates the horizontal scroll percentage in adjustColumns, which leads to the range of viewable columns being off by a few. In the scrollHorizontal function the horizScrollPercentage is calculated using both the canvas width and the viewport width, but in adjustColumns only the canvas width is used. Should both functions be using the same method for determining horizontal scroll percentage?

Guide contributeur