|
@@ -1,192 +1,371 @@
|
1
|
1
|
import * as React from 'react';
|
2
|
|
-import PropTypes from 'prop-types';
|
3
|
|
-import { useTheme } from '@mui/material/styles';
|
|
2
|
+// import { useTheme } from '@mui/material/styles';
|
4
|
3
|
|
5
|
4
|
import {
|
6
|
|
- Table, TableBody, TableCell, TableContainer, TableFooter, TableRow, TablePagination,
|
7
|
|
- IconButton, Paper, Box, Card
|
|
5
|
+ Table, TableBody, TableCell, TableContainer,
|
|
6
|
+ TableRow, TablePagination,
|
|
7
|
+ IconButton, Paper, Box,
|
|
8
|
+ Switch, FormControlLabel,Tooltip,
|
|
9
|
+ Checkbox, Typography, Toolbar,
|
|
10
|
+ TableSortLabel,TableHead
|
8
|
11
|
} from '@mui/material';
|
9
|
12
|
|
10
|
|
-import { Row, Col, Container } from 'react-bootstrap';
|
|
13
|
+import { visuallyHidden } from '@mui/utils';
|
|
14
|
+
|
|
15
|
+import { alpha } from '@mui/material/styles';
|
|
16
|
+
|
|
17
|
+// import { Row, Col, Container } from 'react-bootstrap';
|
11
|
18
|
|
12
|
19
|
import {
|
13
|
|
- LastPage as LastPageIcon,
|
14
|
|
- KeyboardArrowRight,
|
15
|
|
- KeyboardArrowLeft,
|
16
|
|
- FirstPage as FirstPageIcon
|
|
20
|
+ Delete as DeleteIcon,
|
|
21
|
+ FilterList as FilterListIcon,
|
|
22
|
+ // LastPage as LastPageIcon, FirstPage as FirstPageIcon, KeyboardArrowRight, KeyboardArrowLeft,
|
17
|
23
|
} from '@mui/icons-material/'
|
18
|
24
|
|
19
|
|
-function createData(name, calories, fat) {
|
20
|
|
- return { name, calories, fat };
|
|
25
|
+function createData(name, calories, fat, carbs, protein) {
|
|
26
|
+ return {
|
|
27
|
+ name,
|
|
28
|
+ calories,
|
|
29
|
+ fat,
|
|
30
|
+ carbs,
|
|
31
|
+ protein,
|
|
32
|
+ };
|
21
|
33
|
}
|
22
|
34
|
|
23
|
|
-function TablePaginationActions(props) {
|
|
35
|
+const rows = [
|
|
36
|
+ createData('Cupcake', 305, 3.7, 67, 4.3),
|
|
37
|
+ createData('Donut', 452, 25.0, 51, 4.9),
|
|
38
|
+ createData('Eclair', 262, 16.0, 24, 6.0),
|
|
39
|
+ createData('Frozen yoghurt', 159, 6.0, 24, 4.0),
|
|
40
|
+ createData('Gingerbread', 356, 16.0, 49, 3.9),
|
|
41
|
+ createData('Honeycomb', 408, 3.2, 87, 6.5),
|
|
42
|
+ createData('Ice cream sandwich', 237, 9.0, 37, 4.3),
|
|
43
|
+ createData('Jelly Bean', 375, 0.0, 94, 0.0),
|
|
44
|
+ createData('KitKat', 518, 26.0, 65, 7.0),
|
|
45
|
+ createData('Lollipop', 392, 0.2, 98, 0.0),
|
|
46
|
+ createData('Marshmallow', 318, 0, 81, 2.0),
|
|
47
|
+ createData('Nougat', 360, 19.0, 9, 37.0),
|
|
48
|
+ createData('Oreo', 437, 18.0, 63, 4.0),
|
|
49
|
+];
|
|
50
|
+
|
|
51
|
+function descendingComparator(a, b, orderBy) {
|
|
52
|
+ if (b[orderBy] < a[orderBy]) {
|
|
53
|
+ return -1;
|
|
54
|
+ }
|
|
55
|
+ if (b[orderBy] > a[orderBy]) {
|
|
56
|
+ return 1;
|
|
57
|
+ }
|
|
58
|
+ return 0;
|
|
59
|
+}
|
24
|
60
|
|
25
|
|
- const theme = useTheme();
|
26
|
|
- const { count, page, rowsPerPage, onPageChange } = props;
|
|
61
|
+function getComparator(order, orderBy) {
|
|
62
|
+ return order === 'desc'
|
|
63
|
+ ? (a, b) => descendingComparator(a, b, orderBy)
|
|
64
|
+ : (a, b) => -descendingComparator(a, b, orderBy);
|
|
65
|
+}
|
27
|
66
|
|
28
|
|
- const handleFirstPageButtonClick = (event) => {
|
29
|
|
- onPageChange(event, 0);
|
30
|
|
- };
|
|
67
|
+const EnhancedTableToolbar = (props) => {
|
31
|
68
|
|
32
|
|
- const handleBackButtonClick = (event) => {
|
33
|
|
- onPageChange(event, page - 1);
|
34
|
|
- };
|
|
69
|
+ const { numSelected } = props;
|
|
70
|
+ return (
|
|
71
|
+ <Toolbar
|
|
72
|
+ sx={{
|
|
73
|
+ pl: { sm: 2 },
|
|
74
|
+ pr: { xs: 1, sm: 1 },
|
|
75
|
+ ...(numSelected > 0 && {
|
|
76
|
+ bgcolor: (theme) =>
|
|
77
|
+ alpha(theme.palette.primary.main, theme.palette.action.activatedOpacity),
|
|
78
|
+ }),
|
|
79
|
+ }}
|
|
80
|
+ >
|
|
81
|
+ {numSelected > 0 ? (
|
|
82
|
+ <Typography
|
|
83
|
+ sx={{ flex: '1 1 100%' }}
|
|
84
|
+ color="inherit"
|
|
85
|
+ variant="subtitle1"
|
|
86
|
+ component="div"
|
|
87
|
+ >
|
|
88
|
+ {numSelected} selected
|
|
89
|
+ </Typography>
|
|
90
|
+ ) : (
|
|
91
|
+ <Typography
|
|
92
|
+ sx={{ flex: '1 1 100%' }}
|
|
93
|
+ variant="h6"
|
|
94
|
+ id="tableTitle"
|
|
95
|
+ component="div"
|
|
96
|
+ >
|
|
97
|
+ Nutrition
|
|
98
|
+ </Typography>
|
|
99
|
+ )}
|
|
100
|
+
|
|
101
|
+ {numSelected > 0 ? (
|
|
102
|
+ <Tooltip title="Delete">
|
|
103
|
+ <IconButton>
|
|
104
|
+ <DeleteIcon />
|
|
105
|
+ </IconButton>
|
|
106
|
+ </Tooltip>
|
|
107
|
+ ) : (
|
|
108
|
+ <Tooltip title="Filter list">
|
|
109
|
+ <IconButton>
|
|
110
|
+ <FilterListIcon />
|
|
111
|
+ </IconButton>
|
|
112
|
+ </Tooltip>
|
|
113
|
+ )}
|
|
114
|
+ </Toolbar>
|
|
115
|
+ );
|
35
|
116
|
|
36
|
|
- const handleNextButtonClick = (event) => {
|
37
|
|
- onPageChange(event, page + 1);
|
38
|
|
- };
|
|
117
|
+}
|
39
|
118
|
|
40
|
|
- const handleLastPageButtonClick = (event) => {
|
41
|
|
- onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
|
|
119
|
+function EnhancedTableHead(props) {
|
|
120
|
+ const { onSelectAllClick, order, orderBy, numSelected, rowCount, onRequestSort } =
|
|
121
|
+ props;
|
|
122
|
+ const createSortHandler = (property) => (event) => {
|
|
123
|
+ onRequestSort(event, property);
|
42
|
124
|
};
|
43
|
125
|
|
44
|
126
|
return (
|
45
|
|
- <Box sx={{ flexShrink: 0, ml: 2.5 }}>
|
46
|
|
- <IconButton
|
47
|
|
- onClick={handleFirstPageButtonClick}
|
48
|
|
- disabled={page === 0}
|
49
|
|
- aria-label="first page"
|
50
|
|
- >
|
51
|
|
- {theme.direction === 'rtl' ? <LastPageIcon /> : <FirstPageIcon />}
|
52
|
|
- </IconButton>
|
53
|
|
- <IconButton
|
54
|
|
- onClick={handleBackButtonClick}
|
55
|
|
- disabled={page === 0}
|
56
|
|
- aria-label="previous page"
|
57
|
|
- >
|
58
|
|
- {theme.direction === 'rtl' ? <KeyboardArrowRight /> : <KeyboardArrowLeft />}
|
59
|
|
- </IconButton>
|
60
|
|
- <IconButton
|
61
|
|
- onClick={handleNextButtonClick}
|
62
|
|
- disabled={page >= Math.ceil(count / rowsPerPage) - 1}
|
63
|
|
- aria-label="next page"
|
64
|
|
- >
|
65
|
|
- {theme.direction === 'rtl' ? <KeyboardArrowLeft /> : <KeyboardArrowRight />}
|
66
|
|
- </IconButton>
|
67
|
|
- <IconButton
|
68
|
|
- onClick={handleLastPageButtonClick}
|
69
|
|
- disabled={page >= Math.ceil(count / rowsPerPage) - 1}
|
70
|
|
- aria-label="last page"
|
71
|
|
- >
|
72
|
|
- {theme.direction === 'rtl' ? <FirstPageIcon /> : <LastPageIcon />}
|
73
|
|
- </IconButton>
|
74
|
|
- </Box>
|
|
127
|
+ <TableHead>
|
|
128
|
+ <TableRow>
|
|
129
|
+ <TableCell padding="checkbox">
|
|
130
|
+ <Checkbox
|
|
131
|
+ color="primary"
|
|
132
|
+ indeterminate={numSelected > 0 && numSelected < rowCount}
|
|
133
|
+ checked={rowCount > 0 && numSelected === rowCount}
|
|
134
|
+ onChange={onSelectAllClick}
|
|
135
|
+ inputProps={{
|
|
136
|
+ 'aria-label': 'select all desserts',
|
|
137
|
+ }}
|
|
138
|
+ />
|
|
139
|
+ </TableCell>
|
|
140
|
+ {headCells.map((headCell) => (
|
|
141
|
+ <TableCell
|
|
142
|
+ key={headCell.id}
|
|
143
|
+ align={headCell.numeric ? 'right' : 'left'}
|
|
144
|
+ padding={headCell.disablePadding ? 'none' : 'normal'}
|
|
145
|
+ sortDirection={orderBy === headCell.id ? order : false}
|
|
146
|
+ >
|
|
147
|
+ <TableSortLabel
|
|
148
|
+ style={{ fontWeight:'bold' }}
|
|
149
|
+ active={orderBy === headCell.id}
|
|
150
|
+ direction={orderBy === headCell.id ? order : 'asc'}
|
|
151
|
+ onClick={createSortHandler(headCell.id)}
|
|
152
|
+ >
|
|
153
|
+ {headCell.label}
|
|
154
|
+ {orderBy === headCell.id ? (
|
|
155
|
+ <Box component="span" sx={visuallyHidden}>
|
|
156
|
+ {order === 'desc' ? 'sorted descending' : 'sorted ascending'}
|
|
157
|
+ </Box>
|
|
158
|
+ ) : null}
|
|
159
|
+ </TableSortLabel>
|
|
160
|
+ </TableCell>
|
|
161
|
+ ))}
|
|
162
|
+ </TableRow>
|
|
163
|
+ </TableHead>
|
75
|
164
|
);
|
76
|
165
|
}
|
77
|
166
|
|
|
167
|
+function stableSort(array, comparator) {
|
|
168
|
+ const stabilizedThis = array.map((el, index) => [el, index]);
|
|
169
|
+ stabilizedThis.sort((a, b) => {
|
|
170
|
+ const order = comparator(a[0], b[0]);
|
|
171
|
+ if (order !== 0) {
|
|
172
|
+ return order;
|
|
173
|
+ }
|
|
174
|
+ return a[1] - b[1];
|
|
175
|
+ });
|
|
176
|
+ return stabilizedThis.map((el) => el[0]);
|
|
177
|
+}
|
78
|
178
|
|
|
179
|
+const headCells = [
|
|
180
|
+ {
|
|
181
|
+ id: 'name',
|
|
182
|
+ numeric: false,
|
|
183
|
+ disablePadding: true,
|
|
184
|
+ label: 'Dessert (100g serving)',
|
|
185
|
+ },
|
|
186
|
+ {
|
|
187
|
+ id: 'calories',
|
|
188
|
+ numeric: true,
|
|
189
|
+ disablePadding: false,
|
|
190
|
+ label: 'Calories',
|
|
191
|
+ },
|
|
192
|
+ {
|
|
193
|
+ id: 'fat',
|
|
194
|
+ numeric: true,
|
|
195
|
+ disablePadding: false,
|
|
196
|
+ label: 'Fat (g)',
|
|
197
|
+ },
|
|
198
|
+ {
|
|
199
|
+ id: 'carbs',
|
|
200
|
+ numeric: true,
|
|
201
|
+ disablePadding: false,
|
|
202
|
+ label: 'Carbs (g)',
|
|
203
|
+ },
|
|
204
|
+ {
|
|
205
|
+ id: 'protein',
|
|
206
|
+ numeric: true,
|
|
207
|
+ disablePadding: false,
|
|
208
|
+ label: 'Protein (g)',
|
|
209
|
+ },
|
|
210
|
+];
|
79
|
211
|
|
80
|
|
-const rows = [
|
81
|
|
- createData('Cupcake', 305, 3.7),
|
82
|
|
- createData('Donut', 452, 25.0),
|
83
|
|
- createData('Eclair', 262, 16.0),
|
84
|
|
- createData('Frozen yoghurt', 159, 6.0),
|
85
|
|
- createData('Gingerbread', 356, 16.0),
|
86
|
|
- createData('Honeycomb', 408, 3.2),
|
87
|
|
- createData('Ice cream sandwich', 237, 9.0),
|
88
|
|
- createData('Jelly Bean', 375, 0.0),
|
89
|
|
- createData('KitKat', 518, 26.0),
|
90
|
|
- createData('Lollipop', 392, 0.2),
|
91
|
|
- createData('Marshmallow', 318, 0),
|
92
|
|
- createData('Nougat', 360, 19.0),
|
93
|
|
- createData('Oreo', 437, 18.0),
|
94
|
|
-].sort((a, b) => (a.calories < b.calories ? -1 : 1));
|
95
|
|
-
|
96
|
|
-export function Contras() {
|
97
|
|
- const [page, setPage] = React.useState(0);
|
98
|
|
- const [rowsPerPage, setRowsPerPage] = React.useState(5);
|
99
|
|
-
|
100
|
|
- // Avoid a layout jump when reaching the last page with empty rows.
|
101
|
|
- const emptyRows =
|
102
|
|
- page > 0 ? Math.max(0, (1 + page) * rowsPerPage - rows.length) : 0;
|
103
|
|
-
|
104
|
|
- const handleChangePage = (event, newPage) => {
|
105
|
|
- setPage(newPage);
|
106
|
|
- };
|
107
|
212
|
|
108
|
|
- const handleChangeRowsPerPage = (event) => {
|
109
|
|
- setRowsPerPage(parseInt(event.target.value, 10));
|
110
|
|
- setPage(0);
|
111
|
|
- };
|
112
|
213
|
|
113
|
|
- return (
|
|
214
|
+export function Contras() {
|
114
|
215
|
|
115
|
|
- <div className="content-section">
|
116
|
|
- <div className="main">
|
|
216
|
+ const [order, setOrder] = React.useState('asc');
|
|
217
|
+ const [orderBy, setOrderBy] = React.useState('calories');
|
|
218
|
+ const [selected, setSelected] = React.useState([]);
|
|
219
|
+ const [page, setPage] = React.useState(0);
|
|
220
|
+ const [dense, setDense] = React.useState(false);
|
|
221
|
+ const [rowsPerPage, setRowsPerPage] = React.useState(5);
|
|
222
|
+
|
|
223
|
+ const handleRequestSort = (event, property) => {
|
|
224
|
+ const isAsc = orderBy === property && order === 'asc';
|
|
225
|
+ setOrder(isAsc ? 'desc' : 'asc');
|
|
226
|
+ setOrderBy(property);
|
|
227
|
+ };
|
117
|
228
|
|
118
|
|
- <Container>
|
|
229
|
+ const handleSelectAllClick = (event) => {
|
|
230
|
+ if (event.target.checked) {
|
|
231
|
+ const newSelecteds = rows.map((n) => n.name);
|
|
232
|
+ setSelected(newSelecteds);
|
|
233
|
+ return;
|
|
234
|
+ }
|
|
235
|
+ setSelected([]);
|
|
236
|
+ };
|
119
|
237
|
|
120
|
|
- <Row id="password_header">
|
121
|
|
- <Col>
|
122
|
|
- <Card>
|
123
|
|
- <h1>Buscar Contrasena</h1>
|
124
|
|
- </Card>
|
125
|
|
- </Col>
|
126
|
|
- </Row>
|
|
238
|
+ const handleClick = (event, name) => {
|
|
239
|
+ const selectedIndex = selected.indexOf(name);
|
|
240
|
+ let newSelected = [];
|
|
241
|
+
|
|
242
|
+ if (selectedIndex === -1) {
|
|
243
|
+ newSelected = newSelected.concat(selected, name);
|
|
244
|
+ } else if (selectedIndex === 0) {
|
|
245
|
+ newSelected = newSelected.concat(selected.slice(1));
|
|
246
|
+ } else if (selectedIndex === selected.length - 1) {
|
|
247
|
+ newSelected = newSelected.concat(selected.slice(0, -1));
|
|
248
|
+ } else if (selectedIndex > 0) {
|
|
249
|
+ newSelected = newSelected.concat(
|
|
250
|
+ selected.slice(0, selectedIndex),
|
|
251
|
+ selected.slice(selectedIndex + 1),
|
|
252
|
+ );
|
|
253
|
+ }
|
|
254
|
+
|
|
255
|
+ setSelected(newSelected);
|
|
256
|
+ };
|
127
|
257
|
|
|
258
|
+ const handleChangePage = (event, newPage) => {
|
|
259
|
+ setPage(newPage);
|
|
260
|
+ };
|
128
|
261
|
|
129
|
|
- <Row>
|
130
|
|
- <Col>
|
|
262
|
+ const handleChangeRowsPerPage = (event) => {
|
|
263
|
+ setRowsPerPage(parseInt(event.target.value, 10));
|
|
264
|
+ setPage(0);
|
|
265
|
+ };
|
131
|
266
|
|
|
267
|
+ const handleChangeDense = (event) => {
|
|
268
|
+ setDense(event.target.checked);
|
|
269
|
+ };
|
132
|
270
|
|
|
271
|
+ const isSelected = (name) => selected.indexOf(name) !== -1;
|
|
272
|
+
|
|
273
|
+ const emptyRows = page > 0 ? Math.max(0, (1 + page) * rowsPerPage - rows.length) : 0;
|
133
|
274
|
|
|
275
|
+ return (
|
134
|
276
|
|
135
|
|
- <TableContainer component={Paper}>
|
136
|
|
- <Table sx={{ minWidth: 500 }} aria-label="custom pagination table">
|
137
|
|
- <TableBody>
|
138
|
|
- {(rowsPerPage > 0
|
139
|
|
- ? rows.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
140
|
|
- : rows
|
141
|
|
- ).map((row) => (
|
142
|
|
- <TableRow key={row.name}>
|
143
|
|
- <TableCell component="th" scope="row">
|
144
|
|
- {row.name}
|
145
|
|
- </TableCell>
|
146
|
|
- <TableCell style={{ width: 160 }} align="right">
|
147
|
|
- {row.calories}
|
148
|
|
- </TableCell>
|
149
|
|
- <TableCell style={{ width: 160 }} align="right">
|
150
|
|
- {row.fat}
|
151
|
|
- </TableCell>
|
152
|
|
- </TableRow>
|
153
|
|
- ))}
|
|
277
|
+ <div className="content-section">
|
|
278
|
+ <div className="main">
|
154
|
279
|
|
155
|
|
- {emptyRows > 0 && (
|
156
|
|
- <TableRow style={{ height: 53 * emptyRows }}>
|
157
|
|
- <TableCell colSpan={6} />
|
158
|
|
- </TableRow>
|
159
|
|
- )}
|
160
|
|
- </TableBody>
|
161
|
|
- <TableFooter>
|
162
|
|
- <TableRow>
|
163
|
|
- <TablePagination
|
164
|
|
- rowsPerPageOptions={[5, 10, 25, { label: 'All', value: -1 }]}
|
165
|
|
- colSpan={3}
|
166
|
|
- count={rows.length}
|
167
|
|
- rowsPerPage={rowsPerPage}
|
168
|
|
- page={page}
|
169
|
|
- SelectProps={{
|
170
|
|
- inputProps: {
|
171
|
|
- 'aria-label': 'rows per page',
|
172
|
|
- },
|
173
|
|
- native: true,
|
174
|
|
- }}
|
175
|
|
- onPageChange={handleChangePage}
|
176
|
|
- onRowsPerPageChange={handleChangeRowsPerPage}
|
177
|
|
- ActionsComponent={TablePaginationActions}
|
178
|
|
- />
|
179
|
|
- </TableRow>
|
180
|
|
- </TableFooter>
|
181
|
|
- </Table>
|
182
|
|
- </TableContainer>
|
183
|
|
-
|
184
|
|
- </Col>
|
185
|
|
- </Row>
|
186
|
|
-
|
187
|
|
- </Container>
|
188
|
|
-
|
189
|
|
- </div>
|
190
|
|
- </div>
|
191
|
|
- );
|
|
280
|
+ <Box sx={{ width: '100%' }}>
|
|
281
|
+ <Paper sx={{ width: '100%', mb: 2 }}>
|
|
282
|
+ <EnhancedTableToolbar numSelected={selected.length} />
|
|
283
|
+ <TableContainer>
|
|
284
|
+ <Table
|
|
285
|
+ sx={{ minWidth: 750 }}
|
|
286
|
+ aria-labelledby="tableTitle"
|
|
287
|
+ size={dense ? 'small' : 'medium'}
|
|
288
|
+ >
|
|
289
|
+ <EnhancedTableHead
|
|
290
|
+ numSelected={selected.length}
|
|
291
|
+ order={order}
|
|
292
|
+ orderBy={orderBy}
|
|
293
|
+ onSelectAllClick={handleSelectAllClick}
|
|
294
|
+ onRequestSort={handleRequestSort}
|
|
295
|
+ rowCount={rows.length}
|
|
296
|
+ />
|
|
297
|
+ <TableBody>
|
|
298
|
+ {/* if you don't need to support IE11, you can replace the `stableSort` call with:
|
|
299
|
+rows.slice().sort(getComparator(order, orderBy)) */}
|
|
300
|
+ {stableSort(rows, getComparator(order, orderBy))
|
|
301
|
+ .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
|
302
|
+ .map((row, index) => {
|
|
303
|
+ const isItemSelected = isSelected(row.name);
|
|
304
|
+ const labelId = `enhanced-table-checkbox-${index}`;
|
|
305
|
+
|
|
306
|
+ return (
|
|
307
|
+ <TableRow
|
|
308
|
+ hover
|
|
309
|
+ onClick={(event) => handleClick(event, row.name)}
|
|
310
|
+ role="checkbox"
|
|
311
|
+ aria-checked={isItemSelected}
|
|
312
|
+ tabIndex={-1}
|
|
313
|
+ key={row.name}
|
|
314
|
+ selected={isItemSelected}
|
|
315
|
+ >
|
|
316
|
+ <TableCell padding="checkbox">
|
|
317
|
+ <Checkbox
|
|
318
|
+ color="primary"
|
|
319
|
+ checked={isItemSelected}
|
|
320
|
+ inputProps={{
|
|
321
|
+ 'aria-labelledby': labelId,
|
|
322
|
+ }}
|
|
323
|
+ />
|
|
324
|
+ </TableCell>
|
|
325
|
+ <TableCell
|
|
326
|
+ component="th"
|
|
327
|
+ id={labelId}
|
|
328
|
+ scope="row"
|
|
329
|
+ padding="none"
|
|
330
|
+ >
|
|
331
|
+ {row.name}
|
|
332
|
+ </TableCell>
|
|
333
|
+ <TableCell align="right">{row.calories}</TableCell>
|
|
334
|
+ <TableCell align="right">{row.fat}</TableCell>
|
|
335
|
+ <TableCell align="right">{row.carbs}</TableCell>
|
|
336
|
+ <TableCell align="right">{row.protein}</TableCell>
|
|
337
|
+ </TableRow>
|
|
338
|
+ );
|
|
339
|
+ })}
|
|
340
|
+ {emptyRows > 0 && (
|
|
341
|
+ <TableRow
|
|
342
|
+ style={{
|
|
343
|
+ height: (dense ? 33 : 53) * emptyRows,
|
|
344
|
+ }}
|
|
345
|
+ >
|
|
346
|
+ <TableCell colSpan={6} />
|
|
347
|
+ </TableRow>
|
|
348
|
+ )}
|
|
349
|
+ </TableBody>
|
|
350
|
+ </Table>
|
|
351
|
+ </TableContainer>
|
|
352
|
+ <TablePagination
|
|
353
|
+ rowsPerPageOptions={[5, 10, 25]}
|
|
354
|
+ component="div"
|
|
355
|
+ count={rows.length}
|
|
356
|
+ rowsPerPage={rowsPerPage}
|
|
357
|
+ page={page}
|
|
358
|
+ onPageChange={handleChangePage}
|
|
359
|
+ onRowsPerPageChange={handleChangeRowsPerPage}
|
|
360
|
+ />
|
|
361
|
+ </Paper>
|
|
362
|
+ <FormControlLabel
|
|
363
|
+ control={<Switch checked={dense} onChange={handleChangeDense} />}
|
|
364
|
+ label="Dense padding"
|
|
365
|
+ />
|
|
366
|
+ </Box>
|
|
367
|
+
|
|
368
|
+ </div>
|
|
369
|
+ </div>
|
|
370
|
+ );
|
192
|
371
|
}
|