shlomiassaf / ngrid

A angular grid for the enterprise
https://shlomiassaf.github.io/ngrid
MIT License
241 stars 40 forks source link

invalidateColumns breaks other tables when used with RouteReuseStrategy #280

Open romgerman opened 1 year ago

romgerman commented 1 year ago

What is the expected behavior?

All tables work as expected.

What is the current behavior?

When you call invalidateColumns on a table that is inside a route-reusable component, then the table on next page will show no rows (and PblDataSource will not fire a onRenderedDataChanged event).

What are the steps to reproduce?

Click on any row and the table on next page will load indefinitely. Return back, try again, still happening. https://stackblitz.com/edit/pebula-ngrid-starter-cixddi?file=src/app/app.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?

Workaround is not to use invalidateColumns when using RouteReuseStrategy.