Skip to content

[Angular Table] poor performance of flexRenderComponent #6159

@RndUsername

Description

@RndUsername

TanStack Table version

8.21.3

Framework/Library version

Angular 19.2.15

Describe the bug and the steps to reproduce it

When creating the columns array inside of createAngularTable, the components used with flexRenderComponent will be remounted every time the table rerenders. This absolutely tanks performance. When creating the columns array outside of createAngularTable (as shown in the docs) it works fine and only rerenders the cell without destroying it. The docs should make it clear to never add the array inside the options function or the implementation should handle this case.

Try the StackBlitz linked below by pressing the "Rerender" button and you'll see in the console, that the ngOnInit is logged every time.

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://stackblitz.com/edit/tanstack-table-pwizyit7?file=src%2Fapp%2Fapp.component.ts

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I do not know how

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions