Summary
DataTable wraps TanStack React Table with virtual scrolling and sticky columns. Several type safety and performance improvements can be made.
Improvements
2. Optimize IntersectionObserver recreation
The IntersectionObserver is recreated whenever rows.length changes. It should only be recreated when the root element or threshold changes, not on data changes.
4. Replace array index keys in dynamic lists
Array indices used as keys in sortable/filterable rows can cause rendering issues when rows are reordered.
5. Improve sticky column CSS
Sticky column positioning uses inline styles with hardcoded calculations. Consider a more maintainable approach.
Moved to Cross-Cutting Issues
The following items have been moved to cross-cutting issues that address them across all components:
Files
packages/raystack/raystack/components/data-table/
Summary
DataTable wraps TanStack React Table with virtual scrolling and sticky columns. Several type safety and performance improvements can be made.
Improvements
2. Optimize IntersectionObserver recreation
The IntersectionObserver is recreated whenever
rows.lengthchanges. It should only be recreated when the root element or threshold changes, not on data changes.4. Replace array index keys in dynamic lists
Array indices used as keys in sortable/filterable rows can cause rendering issues when rows are reordered.
5. Improve sticky column CSS
Sticky column positioning uses inline styles with hardcoded calculations. Consider a more maintainable approach.
Moved to Cross-Cutting Issues
The following items have been moved to cross-cutting issues that address them across all components:
Files
packages/raystack/raystack/components/data-table/