@mcurros2/microm 1.1.457-0 → 1.1.459-0
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.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8208,6 +8208,19 @@ function $44e7b7cb2565e4b7$export$c7c6b9c457b10b8a(props) {
|
|
|
8208
8208
|
}),
|
|
8209
8209
|
...parentKeys
|
|
8210
8210
|
};
|
|
8211
|
+
const saveResult = await handleSaveBeforeAdd();
|
|
8212
|
+
if (saveResult === "error") {
|
|
8213
|
+
await modals.close();
|
|
8214
|
+
return {
|
|
8215
|
+
Failed: true,
|
|
8216
|
+
Results: [
|
|
8217
|
+
{
|
|
8218
|
+
Status: 11,
|
|
8219
|
+
Message: "Failed to save data before deletion"
|
|
8220
|
+
}
|
|
8221
|
+
]
|
|
8222
|
+
};
|
|
8223
|
+
}
|
|
8211
8224
|
if (keys.length === 1) {
|
|
8212
8225
|
(0, $iKzSR.setValues)(deleteEntity.def.columns, keys[0], null, true);
|
|
8213
8226
|
// Delete selected keys from mergedParentKeys
|
|
@@ -8290,7 +8303,8 @@ function $44e7b7cb2565e4b7$export$c7c6b9c457b10b8a(props) {
|
|
|
8290
8303
|
modals,
|
|
8291
8304
|
labels,
|
|
8292
8305
|
parentKeys,
|
|
8293
|
-
onRecordsDeleted
|
|
8306
|
+
onRecordsDeleted,
|
|
8307
|
+
handleSaveBeforeAdd
|
|
8294
8308
|
]);
|
|
8295
8309
|
const handleDeleteClick = (0, $b4te3$react.useCallback)(async (keys, element)=>{
|
|
8296
8310
|
if (onDeleteClick) {
|
|
@@ -8324,7 +8338,7 @@ function $44e7b7cb2565e4b7$export$c7c6b9c457b10b8a(props) {
|
|
|
8324
8338
|
}),
|
|
8325
8339
|
...parentKeys
|
|
8326
8340
|
};
|
|
8327
|
-
if (keys.length > 0) // Delete selected keys from mergedParentKeys
|
|
8341
|
+
if (action.dontRequireSelection !== true && keys.length > 0) // Delete selected keys from mergedParentKeys
|
|
8328
8342
|
Object.keys(keys[0]).forEach((key)=>{
|
|
8329
8343
|
delete mergedParentKeys[key];
|
|
8330
8344
|
});
|