Material-ui: Using pagination without a table

Created on 3 Oct 2017  Â·  4Comments  Â·  Source: mui-org/material-ui

Right now the pagination works well for paginating tables. However, I have a use case where I want to paginate an unordered list. Right now I can override the root tr component to be a div for example. However, I would like to be able to turn the underlying td into something else as well. Overall I think it would be good if I could use the pagination outside of a table.

Table enhancement

Most helpful comment

Here is how to use the TablePagination outside of the table with #8525:

<TablePagination component="div" …

All 4 comments

@leMaik I have been having a look at how react-toolbox is going to handle deep nesting of the components. This is something we could explore but I believe we could implement something simpler.
Here is what I propose: we remove the TableRow from the TablePagination component. It should be straightforward. Then the root components become a TableCell. As far as I know, people can customize it to fit anywhere.

@oliviertassinari As long as the pagination component still looks as in the specs when used in a table, I'm finde with that. :+1: Sounds like one would just need to wrap <TablePaginaten ... /> inside <TableRow> when using it inside a table? Is using a TableCell outside of a table ok?

Edit: Oh nice, TableCell has a component prop. :tada: I'm working on a PR...

:fireworks: :champagne: :tada:

Here is how to use the TablePagination outside of the table with #8525:

<TablePagination component="div" …
Was this page helpful?
0 / 5 - 0 ratings

Related issues

activatedgeek picture activatedgeek  Â·  3Comments

pola88 picture pola88  Â·  3Comments

newoga picture newoga  Â·  3Comments

mb-copart picture mb-copart  Â·  3Comments

anthony-dandrea picture anthony-dandrea  Â·  3Comments