@campxdev/shared 1.11.36 → 1.11.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -9,13 +9,19 @@ import {
|
|
|
9
9
|
TableCell,
|
|
10
10
|
TableHead,
|
|
11
11
|
TableRow,
|
|
12
|
+
TextField,
|
|
12
13
|
Typography,
|
|
13
14
|
} from '@mui/material'
|
|
14
15
|
import { useEffect, useMemo, useState } from 'react'
|
|
15
16
|
import { usePagination, useRowSelect, useTable } from 'react-table'
|
|
16
|
-
import
|
|
17
|
+
import TableStats from '../common/TableStats'
|
|
17
18
|
import { SortAscIcon, SortDescIcon, SortIcon } from '../common/icons'
|
|
18
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
StyledLimitBox,
|
|
21
|
+
StyledLimitMenu,
|
|
22
|
+
StyledPagination,
|
|
23
|
+
StyledTableFooter,
|
|
24
|
+
} from '../common/styles'
|
|
19
25
|
import { ColumnProps, Sort, TableProps } from '../common/types'
|
|
20
26
|
import BatchActionsHeader from './BatchActionsHeader'
|
|
21
27
|
import { RenderTableBody } from './RenderTableBody'
|
|
@@ -226,14 +232,43 @@ export default function ReactTable({
|
|
|
226
232
|
/>
|
|
227
233
|
</Table>
|
|
228
234
|
{pagination && dataSource && !loading && (
|
|
229
|
-
<
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
<StyledTableFooter>
|
|
236
|
+
<TableStats
|
|
237
|
+
limit={pageSize}
|
|
238
|
+
page={pageIndex + 1}
|
|
239
|
+
totalCount={pageCount}
|
|
240
|
+
/>
|
|
241
|
+
<StyledPagination
|
|
242
|
+
variant="outlined"
|
|
243
|
+
shape="rounded"
|
|
244
|
+
onChange={handlePagination}
|
|
245
|
+
count={Math.ceil(pageCount / pageSize)}
|
|
246
|
+
page={pageIndex + 1}
|
|
247
|
+
/>
|
|
248
|
+
{pagination.handlePageInput && (
|
|
249
|
+
<Box
|
|
250
|
+
sx={{
|
|
251
|
+
'& .MuiBox-root': {
|
|
252
|
+
display: 'flex',
|
|
253
|
+
alignItems: 'center',
|
|
254
|
+
gap: '5px',
|
|
255
|
+
},
|
|
256
|
+
}}
|
|
257
|
+
>
|
|
258
|
+
<TextField
|
|
259
|
+
variant="outlined"
|
|
260
|
+
label={'Page :'}
|
|
261
|
+
size="small"
|
|
262
|
+
value={pageIndex + 1}
|
|
263
|
+
onChange={(e) =>
|
|
264
|
+
pagination.handlePageInput(Number(e.target.value))
|
|
265
|
+
}
|
|
266
|
+
sx={{ width: '80px' }}
|
|
267
|
+
/>
|
|
268
|
+
</Box>
|
|
269
|
+
)}
|
|
270
|
+
<Limit pageSize={pageSize} setPageSize={setPageSize} />
|
|
271
|
+
</StyledTableFooter>
|
|
237
272
|
)}
|
|
238
273
|
</>
|
|
239
274
|
)
|