@bento-core/paginated-table 1.0.1-ctdc.6 → 1.0.1-ctdc.8

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.
@@ -28,7 +28,8 @@ const PaginatedTable = _ref => {
28
28
  activeTab = true,
29
29
  server = true,
30
30
  tblRows = [],
31
- paginationOptions = {}
31
+ paginationOptions = {},
32
+ customTableHeader
32
33
  } = _ref;
33
34
  /**
34
35
  * Initailize useReducer state
@@ -178,7 +179,8 @@ const PaginatedTable = _ref => {
178
179
  onToggleSelectAll: customizeToggleSelectAll || handleToggleSelectAll,
179
180
  onSortByColumn: customizeSortByColumn || handleSortByColumn,
180
181
  onColumnViewChange: customizeColumnViewChange || handleColumnViewChange,
181
- themeConfig: themeConfig
182
+ themeConfig: themeConfig,
183
+ customTableHeader: customTableHeader
182
184
  }));
183
185
  }
184
186
 
@@ -203,7 +205,8 @@ const PaginatedTable = _ref => {
203
205
  onToggleSelectAll: customizeToggleSelectAll || handleToggleSelectAll,
204
206
  onSortByColumn: customizeSortByColumn || handleSortByColumn,
205
207
  onColumnViewChange: customizeColumnViewChange || handleColumnViewChange,
206
- themeConfig: themeConfig
208
+ themeConfig: themeConfig,
209
+ customTableHeader: customTableHeader
207
210
  }));
208
211
  };
209
212
  var _default = PaginatedTable;
@@ -58,6 +58,7 @@ import TableView from 'bento-core/PaginationTable/PaginatedTable';
58
58
  activeFilters={activeFilters}
59
59
  totalRowCount={dashboardStats[config.count]}
60
60
  activeTab={activeTab}
61
+ customTableHeader={CustomTableHeader}
61
62
  />
62
63
  ```
63
64
 
@@ -69,6 +70,7 @@ import TableView from 'bento-core/PaginationTable/PaginatedTable';
69
70
  | themeConfig | FALSE | override style with themeprovider use ClassName provided by bento-core table to apply style (refer to class name table) | |
70
71
  | totalRowCount | TRUE | Total row cound for (Cases, Samples, Files), update based on filter event | |
71
72
  | activeTab | TRUE | prevents http call for inactive tabs (dashboard) /set true to myFile cart | |
73
+ | customTableHeader | FALSE | Customizable table header that replaces the default `TableHeader` | |
72
74
 
73
75
  ## 3 Table component themeConfig Configuration
74
76
  ```
@@ -26,7 +26,7 @@ function AddToCartDialogView(props) {
26
26
  onClose: () => onNoClick()
27
27
  });
28
28
  }
29
- const CustomDialog = DisplayCustomText.component;
29
+ const CustomDialog = DisplayCustomText && DisplayCustomText.component;
30
30
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_core.Dialog, {
31
31
  open: open,
32
32
  "aria-labelledby": "alert-dialog-title",
@@ -39,7 +39,7 @@ function AddToCartDialogView(props) {
39
39
  id: "alert-dialog-description"
40
40
  }, "Are you sure to add All Files", ' ', numberOfFilesSelected, ' ', "to cart")), /*#__PURE__*/_react.default.createElement(_core.DialogActions, {
41
41
  className: "dialog_actions"
42
- }, DisplayCustomText.actions.map(a => /*#__PURE__*/_react.default.createElement(_core.Button, {
42
+ }, DisplayCustomText && DisplayCustomText.actions && DisplayCustomText.actions.map(a => /*#__PURE__*/_react.default.createElement(_core.Button, {
43
43
  className: a.className,
44
44
  onClick: () => {
45
45
  if (a.type === 'Positive') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/paginated-table",
3
- "version": "1.0.1-ctdc.6",
3
+ "version": "1.0.1-ctdc.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@bento-core/cart": "1.0.1-ctdc.3",
17
- "@bento-core/table": "1.0.1-ctdc.4",
17
+ "@bento-core/table": "1.0.1-ctdc.5",
18
18
  "@bento-core/tool-tip": "^1.0.0",
19
19
  "@bento-core/util": "^1.0.0",
20
20
  "@material-ui/icons": "^4.11.3"
@@ -23,6 +23,7 @@ const PaginatedTable = ({
23
23
  server = true,
24
24
  tblRows = [],
25
25
  paginationOptions = {},
26
+ customTableHeader,
26
27
  }) => {
27
28
  /**
28
29
  * Initailize useReducer state
@@ -165,6 +166,7 @@ const PaginatedTable = ({
165
166
  onSortByColumn={customizeSortByColumn || handleSortByColumn}
166
167
  onColumnViewChange={customizeColumnViewChange || handleColumnViewChange}
167
168
  themeConfig={themeConfig}
169
+ customTableHeader={customTableHeader}
168
170
  />
169
171
  </>
170
172
  );
@@ -195,6 +197,7 @@ const PaginatedTable = ({
195
197
  onSortByColumn={customizeSortByColumn || handleSortByColumn}
196
198
  onColumnViewChange={customizeColumnViewChange || handleColumnViewChange}
197
199
  themeConfig={themeConfig}
200
+ customTableHeader={customTableHeader}
198
201
  />
199
202
  </>
200
203
  );
@@ -58,6 +58,7 @@ import TableView from 'bento-core/PaginationTable/PaginatedTable';
58
58
  activeFilters={activeFilters}
59
59
  totalRowCount={dashboardStats[config.count]}
60
60
  activeTab={activeTab}
61
+ customTableHeader={CustomTableHeader}
61
62
  />
62
63
  ```
63
64
 
@@ -69,6 +70,7 @@ import TableView from 'bento-core/PaginationTable/PaginatedTable';
69
70
  | themeConfig | FALSE | override style with themeprovider use ClassName provided by bento-core table to apply style (refer to class name table) | |
70
71
  | totalRowCount | TRUE | Total row cound for (Cases, Samples, Files), update based on filter event | |
71
72
  | activeTab | TRUE | prevents http call for inactive tabs (dashboard) /set true to myFile cart | |
73
+ | customTableHeader | FALSE | Customizable table header that replaces the default `TableHeader` | |
72
74
 
73
75
  ## 3 Table component themeConfig Configuration
74
76
  ```
@@ -26,7 +26,7 @@ function AddToCartDialogView(props) {
26
26
  );
27
27
  }
28
28
 
29
- const CustomDialog = DisplayCustomText.component;
29
+ const CustomDialog = DisplayCustomText && DisplayCustomText.component;
30
30
 
31
31
  return (
32
32
  <>
@@ -55,7 +55,7 @@ function AddToCartDialogView(props) {
55
55
  }
56
56
  </DialogContent>
57
57
  <DialogActions className="dialog_actions">
58
- { DisplayCustomText.actions.map((a) => (
58
+ { DisplayCustomText && DisplayCustomText.actions && DisplayCustomText.actions.map((a) => (
59
59
  <Button
60
60
  className={a.className}
61
61
  onClick={() => {