angular-ui/ui-grid

grid.cellValueGetterCache holding on too long

Open

#2,780 创建于 2015年2月15日

在 GitHub 查看
 (4 评论) (0 反应) (0 负责人)JavaScript (5,395 star) (2,496 fork)batch import
help wantedtype: bug

描述

rc.18 build I have a grid with two static columns and several more columns synthesized depending on the data I want to show (the 'view').

I have various data views, and sometimes the same column (same name) appears in two instances of the grid (these are log runs so the same log may appear in different categorizations).

If the column for a run is in the zero'th position on the first view and say fourth on a different view, the data in the fourth column was showing as a duplicate of the new data now appearing in the first column.

After scratching my head over this for several days, i finally dug into the grid logic and found the caching that caused my issue.

For me, renaming the columns so that each column name was unique for each view (even for the same data source) works around this behavior because the lookup is by name.

BTW - i tried the various notify functions to inform the grid that i'd made a change (after I excised the variable columns between view changes) but this did not seem to touch the cellValueGetterCache.

贡献者指南