Skip to content

[DataTable] Optimize IntersectionObserver, fix index keys, and improve sticky columns #612

@ravisuhag

Description

@ravisuhag

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/

Metadata

Metadata

Labels

componentIndividual component-level issuetriage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions