Skip to content

grid.cellValueGetterCache holding on too long #2780

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

Open
brucemackenzie opened this issue Feb 15, 2015 · 4 comments
Open

grid.cellValueGetterCache holding on too long #2780

brucemackenzie opened this issue Feb 15, 2015 · 4 comments

Comments

@brucemackenzie
Copy link

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.

@brucemackenzie
Copy link
Author

A picture should help.
I altered my logic to insert [row,col] in each cell to diagnose the issue.
gatekeeper-4268 was originally in the third column in this grid that is now apf-2015_02_09....
Notice how the apf column at top left shows [0,0] and so does the gatekeeper-4268 column:

screen shot 2015-02-14 at 9 57 39 am

@c0bra
Copy link
Contributor

c0bra commented Feb 15, 2015

You should be able to use the same field over and over add long as you provide a unique name. If you don't price a name it will generate them and hopefully use incrementing names. That may only have arrived in rc19 though.

@brucemackenzie
Copy link
Author

I tried rc19 but it didn't seem to help thought i was NOT providing a unique name. I figured when the columns were deleted, and i'd called notifyChange there would be no more saved state to worry about.
Thanks for taking the time to look at this.

@PaulL1 PaulL1 added this to the 3.0 milestone Feb 26, 2015
@c0bra
Copy link
Contributor

c0bra commented Mar 13, 2015

@brucemackenzie sorry for not responding for so long.

Do you think I could reproduce this behavior by setting up a grid where I move one columnDef's position in the array and then replace the item in its previous position with a new columnDef?

@PaulL1 PaulL1 modified the milestones: 3.1, 3.0 Mar 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants