When using rowClick row data should be of the clicked row.
What is the current behavior?
When using RouteReuseStrategy with route caching, PblNgridRowEvent event.root?.context?.row returns data of the rows around clicked row (and first time the row itself) when you return to the grid page.
What are the steps to reproduce?
Scroll a little (to ~140). Click on a row. Go back and find the row and click again (maybe multiple times). In the console you'll see that the id in the row data is different each time (and the row data)
What is the expected behavior?
When using
rowClick
row data should be of the clicked row.What is the current behavior?
When using
RouteReuseStrategy
with route caching, PblNgridRowEventevent.root?.context?.row
returns data of the rows around clicked row (and first time the row itself) when you return to the grid page.What are the steps to reproduce?
Scroll a little (to ~140). Click on a row. Go back and find the row and click again (maybe multiple times). In the console you'll see that the id in the row data is different each time (and the row data)
https://stackblitz.com/edit/pebula-ngrid-starter-cd8gfz?file=src/app/components/grid-page/grid-page.component.ts
Which versions of Angular, CDK, Material, NGrid, OS, TypeScript, browsers are affected?
In my project its angular@14.2.12, cdk@14.2.4, material@14.2.4, ngrid@5.0.0, typescript@4.7.2. Any browser.
Is there anything else we should know?
Also reproduces with
vScrollFixed
Workaround is to useclick
event onpbl-ngrid-row
withpblNgridRowOverride
directive