@unbxd-ui/unbxd-react-components 0.2.119 → 0.2.220

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.
@@ -188,7 +188,9 @@ var BaseTable = function BaseTable(props, ref) {
188
188
  ExpandedRowComponent = props.ExpandedRowComponent,
189
189
  noDataComponent = props.noDataComponent,
190
190
  sortByConfig = props.sortByConfig,
191
- resetPageNo = props.resetPageNo;
191
+ resetPageNo = props.resetPageNo,
192
+ pageNo = props.pageNo,
193
+ tbodyClassName = props.tbodyClassName;
192
194
  var _DEFAULT_CHECKBOX_CON = _objectSpread(_objectSpread({}, DEFAULT_CHECKBOX_CONFIG), checkboxConfig || {}),
193
195
  showCheckbox = _DEFAULT_CHECKBOX_CON.enabled,
194
196
  showInHeader = _DEFAULT_CHECKBOX_CON.showInHeader;
@@ -247,7 +249,12 @@ var BaseTable = function BaseTable(props, ref) {
247
249
  };
248
250
  });
249
251
  if (records.length === 0) {
250
- return noDataComponent;
252
+ if (pageNo === 1) {
253
+ return noDataComponent;
254
+ } else {
255
+ var LoaderComponent = _utils["default"].getDefaultConfig("DefaultLoader") || "";
256
+ return /*#__PURE__*/_react["default"].createElement(LoaderComponent, null);
257
+ }
251
258
  } else {
252
259
  return /*#__PURE__*/_react["default"].createElement("table", {
253
260
  className: "RCB-table ".concat(className)
@@ -289,7 +296,9 @@ var BaseTable = function BaseTable(props, ref) {
289
296
  className: className,
290
297
  key: key
291
298
  }, thAttrs), label);
292
- }))), /*#__PURE__*/_react["default"].createElement("tbody", null, records.map(function (rowData, index) {
299
+ }))), /*#__PURE__*/_react["default"].createElement("tbody", {
300
+ className: tbodyClassName
301
+ }, records.map(function (rowData, index) {
293
302
  return /*#__PURE__*/_react["default"].createElement(RowComponent, {
294
303
  key: rowData[idAttribute],
295
304
  isEven: _utils["default"].isEven(index),
@@ -10,7 +10,7 @@ var _BaseTable = _interopRequireDefault(require("./BaseTable"));
10
10
  var _DataLoader = _interopRequireDefault(require("../DataLoader"));
11
11
  var _PaginationComponent = _interopRequireDefault(require("./PaginationComponent"));
12
12
  var _utils = _interopRequireDefault(require("../../core/utils"));
13
- var _excluded = ["className", "wrapperClassName", "records", "columnConfigs", "idAttribute", "searchBy", "getRequestKeys", "showPaginateBar", "paginationPosition", "paginationType", "paginationBar", "requestId", "pageNoKey", "perPageKey", "pageSizeList", "isExpandableTable", "ExpandedRowComponent", "responseFormatter", "noDataComponent", "omitProps", "getUrlParams", "getRequestParams", "checkboxConfig"];
13
+ var _excluded = ["className", "wrapperClassName", "records", "columnConfigs", "idAttribute", "searchBy", "getRequestKeys", "showPaginateBar", "paginationPosition", "paginationType", "paginationBar", "requestId", "pageNoKey", "perPageKey", "pageSizeList", "isExpandableTable", "ExpandedRowComponent", "responseFormatter", "noDataComponent", "omitProps", "getUrlParams", "getRequestParams", "checkboxConfig", "tbodyClassName"];
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
@@ -123,6 +123,7 @@ var Table = function Table(props, ref) {
123
123
  getUrlParams = props.getUrlParams,
124
124
  getRequestParams = props.getRequestParams,
125
125
  checkboxConfig = props.checkboxConfig,
126
+ tbodyClassName = props.tbodyClassName,
126
127
  restProps = _objectWithoutProperties(props, _excluded);
127
128
  /* variables for server data */
128
129
  var _useState = (0, _react.useState)([]),
@@ -238,6 +239,8 @@ var Table = function Table(props, ref) {
238
239
  checkboxConfig: checkboxConfig,
239
240
  idAttribute: idAttribute,
240
241
  noDataComponent: noDataComponent,
242
+ pageNo: pageNo,
243
+ tbodyClassName: tbodyClassName,
241
244
  sortByConfig: sortByConfig,
242
245
  onSort: onSort,
243
246
  resetPageNo: resetPageNo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbxd-ui/unbxd-react-components",
3
- "version": "0.2.119",
3
+ "version": "0.2.220",
4
4
  "description": "React components library",
5
5
  "keywords": [
6
6
  "react components",