material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

Data Table Element

Open jkruder opened this issue 11 years ago • 19 comments

I started a data table widget (https://github.com/jkruder/material-ui/tree/data-table). The docs have a table page with an interactive demo. It's definitely a bit rough but it demonstrates a decent amount of functionality.

I didn't do much in the way of sorting/filtering data yet; I'm leaning towards providing a configurable toolbar and let the user determine how to sort/filter the data. If the user is using some kind of re/flux pattern, the unsorted data is in a store and then the sorted/filtered data is most likely in a separate store.

I'm also considering extracting a majority of the logic into a 'template table' that provides callbacks/props for the header, footer, body, colgroups, etc and simply links everything together and provides the select/fixed header capability (maybe some other common functionality as well). If we decide to go the template route I would remove the Paper element so that the user can include a toolbar or some other UI widget.

Please let me know what ya'll think; I'm open to suggestions. If you have any questions about the implementation let me know!

Thanks!

jkruder avatar Mar 20 '15 20:03 jkruder

might be worth it to look and see if we cant just style https://facebook.github.io/fixed-data-table/ to use material design.

daniellewissc avatar Mar 26 '15 01:03 daniellewissc

Good call; there is a lot of functionality there. We would not have to create and maintain something similar. I'll take a look at skinning it.

jkruder avatar Mar 26 '15 01:03 jkruder

This will be a very useful addition. :+1: to this.

mewben avatar Apr 24 '15 06:04 mewben

+1

afhammad avatar Apr 24 '15 16:04 afhammad

+1

vicentedealencar avatar Apr 25 '15 01:04 vicentedealencar

Seems like there is some interest. I'll update my version of the table so folks can check it out.

jkruder avatar Apr 25 '15 02:04 jkruder

+1

FoxxMD avatar May 27 '15 17:05 FoxxMD

For those interested, please take a look at what I have so far: https://github.com/jkruder/material-ui/tree/data-table. It still needs a bit of clean up/refactoring but a bulk of the functionality is there. Is there anything missing that people would like to see? I envision multiple iterations of the data table to bring it in full/near compliance with the material design spec.

jkruder avatar May 28 '15 00:05 jkruder

@jkruder looks good, pretty basic but will work for my needs. :) :+1:

marconi avatar Jun 14 '15 05:06 marconi

+1

travisfisher avatar Jun 17 '15 14:06 travisfisher

oh hell yeah :+1: thanks @jkruder

FoxxMD avatar Jul 07 '15 20:07 FoxxMD

You're welcome! If you have any feature requests let us know!

jkruder avatar Jul 07 '15 20:07 jkruder

but where is it?

above links seem to be broken

anyway, thank you

vicentedealencar avatar Jul 07 '15 21:07 vicentedealencar

@vicentedealencar https://github.com/callemall/material-ui/tree/master/src/table It's available in 0.9.2.

jkruder avatar Jul 07 '15 21:07 jkruder

@vicentedealencar also at http://material-ui.com/#/components/table

FoxxMD avatar Jul 07 '15 21:07 FoxxMD

is it possible currently to add a column for row actions (e.g. delete button to pop a modal, or an edit button to transition to a new route/view) using the current Table component?

mattgi avatar Jul 14 '15 10:07 mattgi

@mattgi You should be able to. Just add an additional header column and then in your rowData set the column like

{content: myButtonOrModalOrComponent}

along with any other attributes like style. You'll probably need to stop the event so that clicking on a button/other component does not trigger a column click event.

jkruder avatar Jul 14 '15 11:07 jkruder

I am confused - the links above seem broken.

It would be awesome if we can get something like https://github.com/daniel-nagy/md-data-table in react.

mrn3 avatar Sep 08 '16 04:09 mrn3

Looks like it's already been created: https://github.com/andela-cdaniel/mui-data-table

grimunit avatar Dec 05 '16 11:12 grimunit