I'm proposing something similar to FixedDataTable (https://facebook.github.io/fixed-data-table/example-column-groups.html):
<Table>
<ColumnGroup label="Name">
<Column label="First Name" />
<Column label="Last Name" />
</ColumnGroup>
</Table>
The label prop can be either a string or a node. This is a use case in an application I'm building and I've worked around it by rendering an "empty" table above the primary table, but first-class support would be great. I can submit a PR, but would like to make sure this isn't already in the pipeline.
I'm not sure this belongs in react-virtualized. fixed-data-table is a windowing library with a specific focus on HTML-table-like-UI. react-virtualized is a generic windowing library and attempts to avoid specific UI details; put another way, this library attempts to focus on _function_ rather than _presentation_.
The built-in Table component is the sole exception, but even still its presentational logic is _very_ simple/limited.
Hmm...that being said, if you'd like to submit a PR for this, I promise to review it with an open mind. 馃槃 If it seems like it won't add too much complexity, I will roll it in. Deal?
Understood, and I'm certainly looking to keep things simple. I'll take a crack at it. :+1:
Sweet! Welcome to the project 馃槃
Hey @vakhtang 馃榿 It's been a while since we touched base on this issue. Seems like maybe it's been abandoned (or you're just busy, which is totally fine). Since I don't plan on acting on it _myself_ I am going to close the issue for now. If you find time to work on it in the future, open a PR and we can resume discussion. Thanks!
@bvaughn Apologies for the delayed response. Indeed I've been very busy, but I have not abandoned this improvement. I'll revisit it after the new year.
@bvaughn I want to use the Table component from the react-virtualized and have the same use-case of grouped columns. Is there any recommended way to achieve this?
Most helpful comment
@bvaughn Apologies for the delayed response. Indeed I've been very busy, but I have not abandoned this improvement. I'll revisit it after the new year.