Skip to content

Commit

Permalink
[docs] Fix show all rows in table pagination (#18260)
Browse files Browse the repository at this point in the history
  • Loading branch information
markusf1 authored and oliviertassinari committed Nov 7, 2019
1 parent 7440461 commit cc4e428
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 cc4e428

Please sign in to comment.