@ssplib/react-components 0.0.114 → 0.0.116

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.
@@ -47,20 +47,20 @@ const form_1 = require("../../../context/form");
47
47
  function childrenTree(component, prefix, idx) {
48
48
  if (!component.props)
49
49
  return component;
50
- const children = component.props && component.props.children;
50
+ const children = component.props.children;
51
51
  if (!children)
52
52
  return react_1.default.cloneElement(component, Object.assign(Object.assign({}, component.props), { name: `${prefix}.${component.props.name}`, key: component.props.name ? `${prefix}.${component.props.name}` : `noListing-${idx}-${prefix}-${component.props.name}` }));
53
53
  let newChildren;
54
54
  if (Array.isArray(children)) {
55
55
  let c = [];
56
- children.forEach((x) => {
57
- c.push(childrenTree(x, prefix, idx));
56
+ children.forEach((x, cIdx) => {
57
+ c.push(childrenTree(x, prefix, idx + (cIdx + 1)));
58
58
  });
59
59
  newChildren = c;
60
60
  }
61
61
  //
62
62
  else {
63
- newChildren = childrenTree(children, prefix, idx);
63
+ newChildren = childrenTree(children, prefix, idx + 1);
64
64
  }
65
65
  const newComponent = react_1.default.cloneElement(component, Object.assign(Object.assign({}, component.props), { children: newChildren, name: `${prefix}.${component.props.name}`, key: component.props.name ? `${prefix}.${component.props.name}` : `noListing-${idx}-${prefix}-${component.props.name}` }));
66
66
  return newComponent;
@@ -325,7 +325,9 @@ function Table({ columns, fetchFunc, emptyMsg = {
325
325
  react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'center', paddingY: 4 },
326
326
  react_1.default.createElement(material_1.Stack, { direction: 'column', justifyContent: 'center', alignItems: 'center' },
327
327
  react_1.default.createElement(Typography_1.default, { marginBottom: 2 },
328
- getMaxItems().length < itemsCount ? getMaxItems().length : itemsCount,
328
+ currentPage * itemsCount + 1,
329
+ "-",
330
+ currentPage * itemsCount + 1 + getMaxItems().length - 1,
329
331
  " de ",
330
332
  list.length),
331
333
  react_1.default.createElement(Pagination_1.default, { count: paginationCount, siblingCount: isSmall ? 0 : 1, size: 'large', onChange: onPaginationChange, page: listPage }))))))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssplib/react-components",
3
- "version": "0.0.114",
3
+ "version": "0.0.116",
4
4
  "description": "SSP React Components",
5
5
  "main": "index.js",
6
6
  "author": "Pedro Henrique <sr.hudrick@gmail.com>",