-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
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.