foris 6.5.0-beta.5a53eca1 → 6.5.0-beta.a63b5bfa
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/bootstrap/Modal.js +10 -7
- package/common/RichTable/RichTable.js +3 -1
- package/foris-6.5.0.tgz +0 -0
- package/package.json +1 -1
package/bootstrap/Modal.js
CHANGED
|
@@ -88,18 +88,21 @@ export function Modal({ shown, setShown, scrollable, size, children }) {
|
|
|
88
88
|
ModalHeader.propTypes = {
|
|
89
89
|
setShown: PropTypes.func.isRequired,
|
|
90
90
|
title: PropTypes.string.isRequired,
|
|
91
|
+
showCloseButton: PropTypes.bool,
|
|
91
92
|
};
|
|
92
93
|
|
|
93
|
-
export function ModalHeader({ setShown, title }) {
|
|
94
|
+
export function ModalHeader({ setShown, title, showCloseButton = true }) {
|
|
94
95
|
return (
|
|
95
96
|
<div className="modal-header">
|
|
96
97
|
<h1 className="modal-title fs-5">{title}</h1>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
{showCloseButton && (
|
|
99
|
+
<button
|
|
100
|
+
type="button"
|
|
101
|
+
className="btn-close"
|
|
102
|
+
onClick={() => setShown(false)}
|
|
103
|
+
aria-label={_("Close")}
|
|
104
|
+
/>
|
|
105
|
+
)}
|
|
103
106
|
</div>
|
|
104
107
|
);
|
|
105
108
|
}
|
|
@@ -64,13 +64,15 @@ function RichTable({
|
|
|
64
64
|
},
|
|
65
65
|
});
|
|
66
66
|
|
|
67
|
+
const paginationIsNeeded = tableData.length > pageSize && withPagination;
|
|
68
|
+
|
|
67
69
|
return (
|
|
68
70
|
<div className="table-responsive">
|
|
69
71
|
<table className="table table-hover text-nowrap">
|
|
70
72
|
<RichTableHeader table={table} flexRender={flexRender} />
|
|
71
73
|
<RichTableBody table={table} flexRender={flexRender} />
|
|
72
74
|
</table>
|
|
73
|
-
{
|
|
75
|
+
{paginationIsNeeded && (
|
|
74
76
|
<RichTablePagination
|
|
75
77
|
table={table}
|
|
76
78
|
tablePageSize={pageSize}
|
package/foris-6.5.0.tgz
CHANGED
|
Binary file
|
package/package.json
CHANGED