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.
@@ -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
- <button
98
- type="button"
99
- className="btn-close"
100
- onClick={() => setShown(false)}
101
- aria-label={_("Close")}
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
- {withPagination && (
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foris",
3
- "version": "6.5.0-beta.5a53eca1",
3
+ "version": "6.5.0-beta.a63b5bfa",
4
4
  "description": "Foris JS library is a set of components and utils for reForis application and plugins.",
5
5
  "author": "CZ.NIC, z.s.p.o.",
6
6
  "repository": {