@apexcura/ui-components 0.0.11-Beta22 → 0.0.11-Beta23
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.
- package/dist/index.js +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -404,8 +404,12 @@ var AddMoreTable = (props) => {
|
|
|
404
404
|
setRows(remainingRows);
|
|
405
405
|
};
|
|
406
406
|
const onAddVariableData = (rowIndex) => {
|
|
407
|
+
console.log("rowIndex==>", rowIndex);
|
|
407
408
|
setRows((prevRows) => {
|
|
409
|
+
console.log("prevRows===>", prevRows);
|
|
408
410
|
return prevRows.map((row, index) => {
|
|
411
|
+
console.log("row", row);
|
|
412
|
+
console.log("index", index);
|
|
409
413
|
if (index === rowIndex && row.variable_data && row.variable_data.length > 0) {
|
|
410
414
|
const lastVariable = row.variable_data[row.variable_data.length - 1];
|
|
411
415
|
const newVariableId = lastVariable.id + 1;
|
|
@@ -458,7 +462,7 @@ var AddMoreTable = (props) => {
|
|
|
458
462
|
"#": index + 1,
|
|
459
463
|
...eachRow,
|
|
460
464
|
...rowElements,
|
|
461
|
-
actions: /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement("button", { onClick: () =>
|
|
465
|
+
actions: /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement("button", { onClick: () => onAddVariableData(index) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)), /* @__PURE__ */ import_react13.default.createElement("button", { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)), index === rows.length - 1 && /* @__PURE__ */ import_react13.default.createElement("button", { onClick: onHandleRows }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)))
|
|
462
466
|
};
|
|
463
467
|
});
|
|
464
468
|
if (!columns.some((col) => isColumnType(col) && col.dataIndex === "actions")) {
|
package/dist/index.mjs
CHANGED
|
@@ -357,8 +357,12 @@ var AddMoreTable = (props) => {
|
|
|
357
357
|
setRows(remainingRows);
|
|
358
358
|
};
|
|
359
359
|
const onAddVariableData = (rowIndex) => {
|
|
360
|
+
console.log("rowIndex==>", rowIndex);
|
|
360
361
|
setRows((prevRows) => {
|
|
362
|
+
console.log("prevRows===>", prevRows);
|
|
361
363
|
return prevRows.map((row, index) => {
|
|
364
|
+
console.log("row", row);
|
|
365
|
+
console.log("index", index);
|
|
362
366
|
if (index === rowIndex && row.variable_data && row.variable_data.length > 0) {
|
|
363
367
|
const lastVariable = row.variable_data[row.variable_data.length - 1];
|
|
364
368
|
const newVariableId = lastVariable.id + 1;
|
|
@@ -411,7 +415,7 @@ var AddMoreTable = (props) => {
|
|
|
411
415
|
"#": index + 1,
|
|
412
416
|
...eachRow,
|
|
413
417
|
...rowElements,
|
|
414
|
-
actions: /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("button", { onClick: () =>
|
|
418
|
+
actions: /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("button", { onClick: () => onAddVariableData(index) }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)), /* @__PURE__ */ React12.createElement("button", { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), index === rows.length - 1 && /* @__PURE__ */ React12.createElement("button", { onClick: onHandleRows }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)))
|
|
415
419
|
};
|
|
416
420
|
});
|
|
417
421
|
if (!columns.some((col) => isColumnType(col) && col.dataIndex === "actions")) {
|