@apexcura/ui-components 0.0.12-Beta20 → 0.0.12-Beta21
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 +6 -12
- package/dist/index.mjs +6 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -385,13 +385,9 @@ var AddMoreTable = (props) => {
|
|
|
385
385
|
const { icons, ...rest } = item;
|
|
386
386
|
return {
|
|
387
387
|
...rest,
|
|
388
|
-
icons: {
|
|
388
|
+
icons: { delete: "", plus: index === newRow.variable_data.length - 1 ? "" : void 0 }
|
|
389
389
|
};
|
|
390
390
|
});
|
|
391
|
-
updatedVariableData[updatedVariableData.length - 1] = {
|
|
392
|
-
...updatedVariableData[updatedVariableData.length - 1],
|
|
393
|
-
icons: { ...updatedVariableData[updatedVariableData.length - 1].icons, plus: /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null) }
|
|
394
|
-
};
|
|
395
391
|
newRow.variable_data = updatedVariableData;
|
|
396
392
|
}
|
|
397
393
|
setRows((prevData) => [...prevData, newRow]);
|
|
@@ -438,14 +434,12 @@ var AddMoreTable = (props) => {
|
|
|
438
434
|
element: "textarea",
|
|
439
435
|
type: "text"
|
|
440
436
|
},
|
|
441
|
-
icons: { delete:
|
|
437
|
+
icons: { delete: "", plus: "" }
|
|
442
438
|
};
|
|
443
|
-
const updatedVariableData = [...row.variable_data, newVariableData]
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
}
|
|
448
|
-
});
|
|
439
|
+
const updatedVariableData = [...row.variable_data, newVariableData].map((item, index, array) => ({
|
|
440
|
+
...item,
|
|
441
|
+
icons: { delete: "", plus: index === array.length - 1 ? "" : void 0 }
|
|
442
|
+
}));
|
|
449
443
|
return {
|
|
450
444
|
...row,
|
|
451
445
|
variable_data: updatedVariableData
|
package/dist/index.mjs
CHANGED
|
@@ -338,13 +338,9 @@ var AddMoreTable = (props) => {
|
|
|
338
338
|
const { icons, ...rest } = item;
|
|
339
339
|
return {
|
|
340
340
|
...rest,
|
|
341
|
-
icons: {
|
|
341
|
+
icons: { delete: "", plus: index === newRow.variable_data.length - 1 ? "" : void 0 }
|
|
342
342
|
};
|
|
343
343
|
});
|
|
344
|
-
updatedVariableData[updatedVariableData.length - 1] = {
|
|
345
|
-
...updatedVariableData[updatedVariableData.length - 1],
|
|
346
|
-
icons: { ...updatedVariableData[updatedVariableData.length - 1].icons, plus: /* @__PURE__ */ React12.createElement(PlusOutlined, null) }
|
|
347
|
-
};
|
|
348
344
|
newRow.variable_data = updatedVariableData;
|
|
349
345
|
}
|
|
350
346
|
setRows((prevData) => [...prevData, newRow]);
|
|
@@ -391,14 +387,12 @@ var AddMoreTable = (props) => {
|
|
|
391
387
|
element: "textarea",
|
|
392
388
|
type: "text"
|
|
393
389
|
},
|
|
394
|
-
icons: { delete:
|
|
390
|
+
icons: { delete: "", plus: "" }
|
|
395
391
|
};
|
|
396
|
-
const updatedVariableData = [...row.variable_data, newVariableData]
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
}
|
|
401
|
-
});
|
|
392
|
+
const updatedVariableData = [...row.variable_data, newVariableData].map((item, index, array) => ({
|
|
393
|
+
...item,
|
|
394
|
+
icons: { delete: "", plus: index === array.length - 1 ? "" : void 0 }
|
|
395
|
+
}));
|
|
402
396
|
return {
|
|
403
397
|
...row,
|
|
404
398
|
variable_data: updatedVariableData
|