Thank you so much for your efforts on this really amazing library.
Describe the bug
When attempting to use the TableVirtuoso component along with components prop for customizing the markup, I am noticing only a single row being rendered. I am passing { TableRow: props => props.children } as part of the components prop, since I am rendering the <tr /> as part of the itemContent prop so that my markup is semantically correct. (More details in the Additional Context section).
Notice that only a single row is rendered when the data contains more row data objects.
Expected behavior
Should render all the rows passed as data prop.
Screenshots
Desktop (please complete the following information):
OS: macOS Venture 13.5
Browser: Chrome
Additional context
I am attempting to bring virtualization capabilities to my Table component.
I am using the context prop to do some state management.
The reason I need the components.TableRow to just be a passthrough, is because I want the users of the Table component to pass props to Table.Row - via the itemContent prop - as seen on the Sandbox.
I'll be more than happy to contribute a fix for this, with your help, once you confirm if this is actually a bug.
Thank you so much for your efforts on this really amazing library.
Describe the bug When attempting to use the
TableVirtuoso
component along withcomponents
prop for customizing the markup, I am noticing only a single row being rendered. I am passing{ TableRow: props => props.children }
as part of the components prop, since I am rendering the<tr />
as part of theitemContent
prop so that my markup is semantically correct. (More details in the Additional Context section).Reproduction Reproduction CSB Link: https://codesandbox.io/p/sandbox/charming-leftpad-yvwzmj?file=%2FApp.js%3A43%2C23 I took the material UI example on the website and just updated the value for the instead of a React Fragment.
components
prop, and wrapped theitemContent
prop withTo Reproduce Steps to reproduce the behavior:
Expected behavior Should render all the rows passed as
data
prop.Screenshots
Desktop (please complete the following information):
Additional context I am attempting to bring virtualization capabilities to my
Table
component. I am using thecontext
prop to do some state management. The reason I need thecomponents.TableRow
to just be a passthrough, is because I want the users of the Table component to pass props toTable.Row
- via theitemContent
prop - as seen on the Sandbox.I'll be more than happy to contribute a fix for this, with your help, once you confirm if this is actually a bug.
Thank you once again for your time 😊.