contentoh-components-library 21.4.13 → 21.4.14

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.
@@ -73,8 +73,8 @@ var GridItem = function GridItem(_ref) {
73
73
  return e.stopPropagation();
74
74
  },
75
75
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckBox.CheckBox, {
76
- id: id,
77
- name: id,
76
+ id: "chk-" + id,
77
+ name: "chk-" + id,
78
78
  className: "chk-absolute",
79
79
  onChange: function onChange(e) {
80
80
  return chkOnChange && chkOnChange(e, product);
@@ -23,7 +23,7 @@ var RowItem = function RowItem(_ref) {
23
23
  children: productsArray.map(function (_ref2, i) {
24
24
  var cols = _ref2.cols,
25
25
  product = _ref2.product,
26
- article = _ref2.article;
26
+ id = _ref2.id;
27
27
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
28
28
  className: "row-container",
29
29
  onClick: function onClick(e) {
@@ -35,8 +35,8 @@ var RowItem = function RowItem(_ref) {
35
35
  e.stopPropagation();
36
36
  },
37
37
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckBox.CheckBox, {
38
- id: (article === null || article === void 0 ? void 0 : article.id_article) + "-" + (article === null || article === void 0 ? void 0 : article.id_order),
39
- name: (article === null || article === void 0 ? void 0 : article.id_article) + "-" + (article === null || article === void 0 ? void 0 : article.id_order),
38
+ id: "chk-" + id,
39
+ name: "chk-" + id,
40
40
  className: "chk-item",
41
41
  onChange: function onChange(e) {
42
42
  return chkOnChange && chkOnChange(e, product);
@@ -48,9 +48,9 @@ var RowItem = function RowItem(_ref) {
48
48
  element: col.name,
49
49
  flex: col.flex,
50
50
  minWidth: col.minWidth
51
- }, (article === null || article === void 0 ? void 0 : article.id_article) + "-" + (article === null || article === void 0 ? void 0 : article.id_order) + "-" + i);
51
+ }, id + "-" + i);
52
52
  })]
53
- }, (article === null || article === void 0 ? void 0 : article.id_article) + "-" + (article === null || article === void 0 ? void 0 : article.id_order));
53
+ }, id);
54
54
  })
55
55
  });
56
56
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.4.13",
3
+ "version": "21.4.14",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -39,8 +39,8 @@ export const GridItem = ({
39
39
  <Container onClick={(e) => onGridClick && onGridClick(e, product, index)}>
40
40
  <div className="chk-container" onClick={(e) => e.stopPropagation()}>
41
41
  <CheckBox
42
- id={id}
43
- name={id}
42
+ id={"chk-" + id}
43
+ name={"chk-" + id}
44
44
  className="chk-absolute"
45
45
  onChange={(e) => chkOnChange && chkOnChange(e, product)}
46
46
  defaultChecked={chkChecked && chkChecked(product)}
@@ -10,10 +10,10 @@ export const RowItem = ({
10
10
  }) => {
11
11
  return (
12
12
  <Container>
13
- {productsArray.map(({ cols, product, article }, i) => (
13
+ {productsArray.map(({ cols, product, id }, i) => (
14
14
  <div
15
15
  className="row-container"
16
- key={article?.id_article + "-" + article?.id_order}
16
+ key={id}
17
17
  onClick={(e) => onGridClick && onGridClick(e, product, i)}
18
18
  >
19
19
  <div
@@ -23,8 +23,8 @@ export const RowItem = ({
23
23
  }}
24
24
  >
25
25
  <CheckBox
26
- id={article?.id_article + "-" + article?.id_order}
27
- name={article?.id_article + "-" + article?.id_order}
26
+ id={"chk-" + id}
27
+ name={"chk-" + id}
28
28
  className="chk-item"
29
29
  onChange={(e) => chkOnChange && chkOnChange(e, product)}
30
30
  defaultChecked={chkChecked && chkChecked(product)}
@@ -32,7 +32,7 @@ export const RowItem = ({
32
32
  </div>
33
33
  {cols.map((col, i) => (
34
34
  <ColumnItem
35
- key={article?.id_article + "-" + article?.id_order + "-" + i}
35
+ key={id + "-" + i}
36
36
  element={col.name}
37
37
  flex={col.flex}
38
38
  minWidth={col.minWidth}