@mcurros2/microm 1.1.417-0 → 1.1.418-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.map +1 -1
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7200,13 +7200,20 @@ const $feb3b896c48c1f2a$var$createParentKeysObject = (columnNames, values, entit
|
|
|
7200
7200
|
};
|
|
7201
7201
|
function $feb3b896c48c1f2a$export$63173dda48cd7d28(props) {
|
|
7202
7202
|
const { formAPI: formAPI, columnNames: columnNames, entity: entity } = props;
|
|
7203
|
-
const [parentKeys, setParentKeys] = (0, $b4te3$react.useState)(
|
|
7204
|
-
const
|
|
7205
|
-
|
|
7206
|
-
const
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7203
|
+
const [parentKeys, setParentKeys] = (0, $b4te3$react.useState)($feb3b896c48c1f2a$var$createParentKeysObject(columnNames, formAPI.form.values, entity));
|
|
7204
|
+
const previousParentKeys = (0, $b4te3$react.useRef)({});
|
|
7205
|
+
(0, $b4te3$react.useLayoutEffect)(()=>{
|
|
7206
|
+
const newParentKeys = $feb3b896c48c1f2a$var$createParentKeysObject(columnNames, formAPI.form.values, entity);
|
|
7207
|
+
if ((0, $2cfmO.areValuesObjectsEqual)(previousParentKeys.current, newParentKeys)) return;
|
|
7208
|
+
setParentKeys(newParentKeys);
|
|
7209
|
+
previousParentKeys.current = (0, $2cfmO.copyValuesObject)(newParentKeys);
|
|
7210
|
+
}, [
|
|
7211
|
+
formAPI.form,
|
|
7212
|
+
formAPI.form.values,
|
|
7213
|
+
columnNames,
|
|
7214
|
+
entity,
|
|
7215
|
+
entity.parentKeys
|
|
7216
|
+
]);
|
|
7210
7217
|
return parentKeys;
|
|
7211
7218
|
}
|
|
7212
7219
|
|