diff --git a/docs/data/material/components/tables/EnhancedTable.js b/docs/data/material/components/tables/EnhancedTable.js index 8e6b3ecab975b2..bfce9606bbd311 100644 --- a/docs/data/material/components/tables/EnhancedTable.js +++ b/docs/data/material/components/tables/EnhancedTable.js @@ -304,7 +304,7 @@ export default function EnhancedTable() { /> {/* if you don't need to support IE11, you can replace the `stableSort` call with: - rows.slice().sort(getComparator(order, orderBy)) */} + rows.sort(getComparator(order, orderBy)).slice() */} {stableSort(rows, getComparator(order, orderBy)) .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage) .map((row, index) => { diff --git a/docs/data/material/components/tables/EnhancedTable.tsx b/docs/data/material/components/tables/EnhancedTable.tsx index 51a8e1f23e0328..0ab35d645d1b96 100644 --- a/docs/data/material/components/tables/EnhancedTable.tsx +++ b/docs/data/material/components/tables/EnhancedTable.tsx @@ -335,7 +335,7 @@ export default function EnhancedTable() { /> {/* if you don't need to support IE11, you can replace the `stableSort` call with: - rows.slice().sort(getComparator(order, orderBy)) */} + rows.sort(getComparator(order, orderBy)).slice() */} {stableSort(rows, getComparator(order, orderBy)) .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage) .map((row, index) => {