@maif/react-forms 1.0.20 → 1.0.21
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/react-form.js +1 -1
- package/lib/form.js +7 -12
- package/package.json +1 -1
package/lib/form.js
CHANGED
|
@@ -316,9 +316,13 @@ var Form = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, ref) {
|
|
|
316
316
|
}, [data]);
|
|
317
317
|
|
|
318
318
|
if (options.watch) {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
319
|
+
if (typeof options.watch === 'function') {
|
|
320
|
+
options.watch(watch());
|
|
321
|
+
} else {
|
|
322
|
+
console.group('react-form watch');
|
|
323
|
+
console.log(watch());
|
|
324
|
+
console.groupEnd();
|
|
325
|
+
}
|
|
322
326
|
}
|
|
323
327
|
|
|
324
328
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
@@ -1124,17 +1128,8 @@ var NestedForm = function NestedForm(_ref16) {
|
|
|
1124
1128
|
return setCollapsed(!collapsed);
|
|
1125
1129
|
}
|
|
1126
1130
|
}), schemaAndFlow.flow.map(function (entry, idx) {
|
|
1127
|
-
var _schemaAndFlow$schema;
|
|
1128
|
-
|
|
1129
1131
|
var step = schemaAndFlow.schema[entry];
|
|
1130
1132
|
var realError = error && error[entry];
|
|
1131
|
-
console.debug({
|
|
1132
|
-
schema: schema,
|
|
1133
|
-
entry: entry,
|
|
1134
|
-
result: (0, _Option.option)((_schemaAndFlow$schema = schemaAndFlow.schema) === null || _schemaAndFlow$schema === void 0 ? void 0 : _schemaAndFlow$schema.collapseField).map(function (f) {
|
|
1135
|
-
return f === entry;
|
|
1136
|
-
}).getOrElse(idx > 0)
|
|
1137
|
-
});
|
|
1138
1133
|
var oneVisibleSetup = Object.values(schema).some(function (v) {
|
|
1139
1134
|
return !!v.visibleOnCollapse;
|
|
1140
1135
|
});
|