react-material-design-lite icon indicating copy to clipboard operation
react-material-design-lite copied to clipboard

Add Table

Open haoxins opened this issue 10 years ago • 6 comments

haoxins avatar Sep 19 '15 04:09 haoxins

Maybe this should have separate elements, like suggested in the Tabs PR. It doesn't do anything special with the insides of the table, so maybe we can just inject children and the end user can put normal table contents in it. That way you just replace <table> with <Table> and get material styling on it. Thoughts?

phated avatar Sep 21 '15 20:09 phated

Material-ui originally went with a Table component that just had like over nine thousand configuration options for their initial version. However they split that up into a bunch of components that represent parts of a table (TableBody, TableRow, etc).

RangerMauve avatar Sep 21 '15 20:09 RangerMauve

That way you just replace <table> with <Table> and get material styling on it.

There are some optional classes on table data cells, such as mdl-data-table__cell--non-numeric. And the user could pass ReactElement as columns and rows also.

haoxins avatar Sep 22 '15 12:09 haoxins

@coderhaoxin I think we should have separate components for rows, columns, etc

phated avatar Sep 22 '15 19:09 phated

@phated

have separate components for rows, columns

done

haoxins avatar Sep 23 '15 13:09 haoxins

I think the mapping needs to go away. A component library should just accept children, not custom DSLs of arrays of objects.

phated avatar Oct 02 '15 01:10 phated