-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add option to virtualize Table rows #774
Conversation
1607dc4
to
8978ee4
Compare
| { groupBy?: C[number]["accessor"]; virtualizeRows?: never } | ||
| { groupBy?: never; virtualizeRows?: { estimateRowHeight: (index: number) => number } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mutually exclusive for now as I didn't investigate how to support virtualizing tables with groupBy
enabled
numberOfStickyColumns={stickyLeftColumnsIds.length} | ||
/>, | ||
...row.leafRows.map((row, index) => { | ||
<Box style={{ height: tableHeight(height) }} ref={tableContainerRef} overflow="auto"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% sure of the possible implications of adding an extra wrapper here
8978ee4
to
131315f
Compare
131315f
to
826e7fa
Compare
826e7fa
to
4d418b6
Compare
4d418b6
to
437c8d4
Compare
437c8d4
to
ad34e35
Compare
typeof virtualizeRowsConfig === "boolean" ? virtualizeRowsConfig : virtualizeRowsConfig != null; | ||
const estimateSize = | ||
typeof virtualizeRowsConfig === "boolean" | ||
? () => 52 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure how to pick a proper default value here. In practice, testing it, it doesn't seem to change much
1022f4f
to
187049f
Compare
187049f
to
776670a
Compare
776670a
to
3dfa14f
Compare
This PR adds support for virtualizing the rows in a
Table
, using@tanstack/react-virtual
. Virtualization is opt-in and for the time being it can't be enabled when grouping is also enabled