-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathTableFooter.js
More file actions
74 lines (70 loc) · 2.02 KB
/
TableFooter.js
File metadata and controls
74 lines (70 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import React, { useContext } from "react";
import Pagination from "./Pagination";
import ADPagination from "./ADPagination";
const TableFooter = ({
id,
isFirst,
isLast,
paginationInfo,
pages,
page_number,
is_temp_page,
temp_page_number,
previousPage,
firstPage,
nextPage,
lastPage,
goToPage,
onPageChange,
onPageBlur,
}) => {
const config = useContext(ConfigContext);
config.show_info && config.show_pagination ? (
<div
className="row table-foot asrt-table-foot"
id={id ? id + "-table-foot" : ""}
>
<div className="col-md-6">
{config.show_info ? paginationInfo : null}
</div>
<div className="col-md-6 pull-right text-right">
{config.show_pagination ? (
<nav aria-label="Page navigation" className="pull-right">
<ul className="pagination justify-content-end asrt-pagination">
{config.pagination == "basic" ? (
<Pagination
config={config}
isFirst={isFirst}
isLast={isLast}
pages={pages}
page_number={page_number}
is_temp_page={is_temp_page}
temp_page_number={temp_page_number}
previousPage={previousPage}
firstPage={firstPage}
nextPage={nextPage}
lastPage={lastPage}
goToPage={goToPage}
onPageChange={onPageChange}
onPageBlur={onPageBlur}
/>
) : (
<ADPagination
language={config.language}
isFirst={isFirst}
isLast={isLast}
pages={pages}
page_number={page_number}
previousPage={previousPage}
nextPage={nextPage}
goToPage={goToPage}
/>
)}
</ul>
</nav>
) : null}
</div>
</div>
) : null;
};
export default TableFooter;