Vertical scrolling results in retained css stylings from previous rows
#6,434 opened on 2017年10月23日
説明
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