Skip to content
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

PblNgridCellEvent rowIndex not matching _rowIndex inside PblNgridRowComponent #285

Open
phantasma2983 opened this issue Jul 12, 2023 · 0 comments

Comments

@phantasma2983
Copy link

What is the current behavior?

I have a complex ngrid table using vScrollFixed and Global Templates.

After multiple datasource refreshes some rows have the wrong rowIndex inside viewCache so I get the "Cannot read properties of undefined (reading 'rowContext')" error.

After some debugging I figured out that when building the viewCache the _rowIndex of the row in question is different than the expected one and thus is saved in viewCache under a different key. What ends up happening is when createCellEvent is created is can't find the rowIndex in viewCache since it's under a different id. This caused the context of the PblNgridCellEvent to be undefined. I'm not sure if this problem is being caused by Angular CDK or something inside NGrid.

What are the steps to reproduce?

I can always reproduce the issue after multiple datasource refreshes and scrolls through the table but sometimes it takes more than 3-4 datasource refreshes to show up. I haven't figured out the pattern.

Which versions of Angular, CDK, Material, NGrid, OS, TypeScript, browsers are affected?

Angular: v14-lts on all packages (including cdk and cdk-experimental)
NGrid: 5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant