Skip to content

Commit

Permalink
[docs] Fix show all rows in table pagination (#18258)
Browse files Browse the repository at this point in the history
  • Loading branch information
markusf1 committed Nov 7, 2019
1 parent 7440461 commit 20615ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ export default function CustomPaginationActionsTable() {
<div className={classes.tableWrapper}>
<Table className={classes.table} aria-label="custom pagination table">
<TableBody>
{rows.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map(row => (
{(rowsPerPage > 0
? rows.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
: rows
).map(row => (
<TableRow key={row.name}>
<TableCell component="th" scope="row">
{row.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ export default function CustomPaginationActionsTable() {
<div className={classes.tableWrapper}>
<Table className={classes.table} aria-label="custom pagination table">
<TableBody>
{rows.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map(row => (
{(rowsPerPage > 0
? rows.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
: rows
).map(row => (
<TableRow key={row.name}>
<TableCell component="th" scope="row">
{row.name}
Expand Down

0 comments on commit 20615ed

Please sign in to comment.