Monday 16 July 2018

TrackBy reuse across nested ngFors (nested or 2d arrays)

In the following example:
https://stackblitz.com/edit/track-by-reuse?file=src/app/app.component.ts
if you change the number of columns from 4 to 3 the td elements with 1, 2, 3, 5, 6 and 9 are reused because of the trackBy functions but 4, 7, and 8 and re-rendered because they move from one tr element to the next.

Is there a way to track elements across nested ngFors? Could this be a feature request?

Example here https://stackoverflow.com/a/45308735/6656422 doesn't seem to work.



from TrackBy reuse across nested ngFors (nested or 2d arrays)

No comments:

Post a Comment