-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[Table] Composable and simpler API #2251
Comments
How far along is this? Maybe I can help. Since we're already using material-ui for a pretty ambitious project at my company, I'd rather use Table vs having to integrate/extend another react data table implementation. The key features we need are cell editing/editors (e.g. components inside cells as editors on cell click) and support for hierarchical data. We might be able to contribute some cycles to adding these features. |
@Dreculah, this is in the ROADMAP and is definitely planned, but I don't believe any real work has been started with this. The core maintainers are mostly tied up with improving the code quality and stability rather than creating new components, so if you wanted to give this a stab, it'd be appreciated! As @alitaheri mentioned in the description of the issue, we're likely going to pursue a component redesign for this rather than adding additional functionality to what is there. If you wanted to make a proposal/mock up an end user API for this, it'd be super appreciated. We can regroup after and decide what the next steps are. Also,
That's awesome. That'd be really cool functionality for the project. 👍 |
@Dreculah I needed what you want. so I squeezed a TextField inside the table. And it's working great. It's a good workaround for now if it covers your use-case |
I've cross posted to react-data-grid about this as well... For hierarchical data, we need something like this: http://dev.sencha.com/deploy/ext-4.0.1/examples/tree/treegrid.html Since the material-ui project wants to rewrite its table to give it the features already in react-data-grid. I wonder if react-data-grid code is compatible enough that it could be used/forked instead? |
Another grid example is http://griddlegriddle.github.io/Griddle/ |
something like this would be great: |
I have been using It doesn't need to handle interactions in table cells too, such input, dropdown or checkbox. Just offer several pre-styled dumb components like |
By the way, for anyone looking for a data grid, it should be implemented differently than a table. I'd recommend using an existing data grid library and just applying material styling too it. |
@nathanmarks looking forward to 0.16.0 |
@zachguo Me too 😄 |
@nathanmarks What's the difference between a "data grid" and a table? |
@zakdances I guess data grid implies more advanced features like grouping, sorting, filtering, cell-editing etc. Table would be a more plain table to view data without the need for advanced functionality. At least thats how I would interpret these terms |
Regarding #2246. I'd say we should rewrite table, it's better not to use HTML table and instead do it all with
div
. This will give very flexible api and capability that would otherwise be impossible withtable
.Right now there are tight couplings between
Table
and it's child componentsTableHeader
,TableBody
andTableFooter
. There should be carefully designed props instead of wrapping the child components withindiv
s andtable
s only to apply some styles and callbacks that can hurt composibility and customizability.But I guess if we decide to do this we have to rewrite all the table components. Therefore, deprecation will be very hard.
Roadmap:
Table
as it is for now.Table
component set.Table
components after some time.New Components to be built:
The sizes of columns will be passed down the hierarchy by the
Table
component. This information is something like this:This means the first column will have the width of 500, the second 100 and so on.
With this, one can implement any feature around the table. Or even build it within the components. Features such as sorting, pagination, flexible columns, resizable columns, editable cells and so on. All these are possible right now, but with a lot of pain. Because the coupling is very tight. But with this things can become a lot easier for others to customize the table to their needs.
I'd love to hear everyone's thoughts on this. Or how it can be improved further.
The text was updated successfully, but these errors were encountered: