Skip to content

[EuiDataGrid] Allow consumers to render their own non-virtualized data grid bodies #6523

@cee-chen

Description

@cee-chen

Summary

The virtualization library used by EuiDataGrid makes several features that multiple teams (Discover, Security) extremely difficult to almost impossible. These features include expandable row details (#5638), col/row groups (#4636), and infinite scrolling (#2981).

Proposal

Expanding EuiDataGrid for every single extremely specific use case is quickly growing untenable. Many of the teams requesting these features additionally have very little interest in the virtualization portion of the EuiDataGrid, and/or want to roll their own (e.g. for infinite scrolling).

My proposal is to provide some kind of render function for EuiDataGrid (similar to renderCellValue, but for the entire data grid body) that:

  1. Bypasses react-window virtualization entirely
  2. Passes our EuiDataGridCell component (and any other params needed - investigated needed) to said render function, which allows consumers to completely customize however they want their cells rendered - e.g. custom row wrappers, etc.)

How feasible this be remains to be seen: this issue is primarily being opened for exploratory/investigation purposes.

Challenges that need to be thought through

  • Ensuring column widths are still correctly passed
  • Sorting/hiding works as before
  • Keyboard navigation and cell focus works as before

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions