angular-ui/ui-grid

Vertical scrolling results in retained css stylings from previous rows

Open

#6,434 opened on Oct 23, 2017

View on GitHub
 (2 comments) (1 reaction) (0 assignees)JavaScript (5,395 stars) (2,496 forks)batch import
good first issue

Description

We are using ui-grid 3.0.7. Recently we introduced a change into one of our grids where the class of a cell's content changes via an ng-show directive in the cell's template (in certain data-driven situations we want to show the cell's background as red instead of the default white). This works, however what happens as the user scrolls through the rows vertically is that the visible cells in the grid seem to retain the red background even though the original row is no longer visible.

For example, lets say that we have a grid defined with 20 visible rows and row #2 has the cell with a red background. The user then scrolls down and the grid now displays the next 20 rows. What happens is that visible row #2 still displays the cell with a red background even though the data in that cell dictates that the cell should have a normal default white background. Essentially the styling is being retained but should have been reset as the rows were scrolled.

Any ideas are appreciated. Thanks

Contributor guide

Vertical scrolling results in retained css stylings from previous rows · angular-ui/ui-grid#6434 | Good First Issue