@react-typed-forms/schemas 11.13.2 → 11.13.3
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/lib/index.js +3 -2
- package/lib/index.js.map +1 -1
- package/lib/util.d.ts +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -661,6 +661,7 @@ function applyLengthRestrictions(length, min, max, minValue, maxValue) {
|
|
|
661
661
|
return [min == null || length > min ? minValue : undefined, max == null || length < max ? maxValue : undefined];
|
|
662
662
|
}
|
|
663
663
|
function findFieldPath(fields, fieldPath) {
|
|
664
|
+
if (!fieldPath) return undefined;
|
|
664
665
|
var fieldNames = fieldPath.split("/");
|
|
665
666
|
var foundFields = [];
|
|
666
667
|
var i = 0;
|
|
@@ -1102,7 +1103,7 @@ var defaultUseEvalExpressionHook = makeEvalExpressionHook(defaultEvalHooks);
|
|
|
1102
1103
|
function makeEvalExpressionHook(f) {
|
|
1103
1104
|
return function (expr, coerce) {
|
|
1104
1105
|
return {
|
|
1105
|
-
deps: expr
|
|
1106
|
+
deps: expr != null ? expr.type : "!",
|
|
1106
1107
|
state: expr,
|
|
1107
1108
|
runHook: function runHook(ctx, state) {
|
|
1108
1109
|
return state ? f(state, ctx, coerce) : undefined;
|
|
@@ -1217,7 +1218,7 @@ function useEvalLabelText(useExpr, definition) {
|
|
|
1217
1218
|
}
|
|
1218
1219
|
function makeDynamicPropertyHook(dynamicValue, makeDefault, state, deps) {
|
|
1219
1220
|
return {
|
|
1220
|
-
deps: deps
|
|
1221
|
+
deps: deps === undefined ? dynamicValue.deps : [deps, dynamicValue.deps].map(toDepString).join(),
|
|
1221
1222
|
runHook: function runHook(ctx, s) {
|
|
1222
1223
|
var _dynamicValue$runHook;
|
|
1223
1224
|
return (_dynamicValue$runHook = dynamicValue.runHook(ctx, s[0])) != null ? _dynamicValue$runHook : makeDefault(ctx, s[1]);
|