@react-typed-forms/schemas 11.0.1 → 11.0.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 +5 -3
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -1077,14 +1077,15 @@ function useJsonataExpression(jExpr, dataContext, bindings, coerce) {
|
|
|
1077
1077
|
}, [fullExpr]);
|
|
1078
1078
|
var control = core.useControl();
|
|
1079
1079
|
var listenerRef = React.useRef();
|
|
1080
|
+
var updateRef = React.useRef(0);
|
|
1080
1081
|
var _useRefState = core.useRefState(function () {
|
|
1081
1082
|
return core.makeChangeTracker(function () {
|
|
1082
1083
|
var l = listenerRef.current;
|
|
1083
1084
|
if (l) {
|
|
1084
1085
|
listenerRef.current = undefined;
|
|
1085
1086
|
core.addAfterChangesCallback(function () {
|
|
1086
|
-
l();
|
|
1087
1087
|
listenerRef.current = l;
|
|
1088
|
+
l();
|
|
1088
1089
|
});
|
|
1089
1090
|
}
|
|
1090
1091
|
});
|
|
@@ -1097,13 +1098,14 @@ function useJsonataExpression(jExpr, dataContext, bindings, coerce) {
|
|
|
1097
1098
|
collect = _ref$current[0],
|
|
1098
1099
|
updateSubscriptions = _ref$current[1];
|
|
1099
1100
|
var _temp = _finallyRethrows(function () {
|
|
1101
|
+
updateRef.current++;
|
|
1100
1102
|
var bindingData = bindings ? core.collectChanges(collect, bindings) : undefined;
|
|
1101
1103
|
var _coerce = coerce;
|
|
1102
1104
|
return Promise.resolve(compiledExpr.evaluate(core.trackedValue(dataContext.data, collect), bindingData)).then(function (_compiledExpr$evaluat) {
|
|
1103
1105
|
control.value = _coerce(_compiledExpr$evaluat);
|
|
1104
1106
|
});
|
|
1105
1107
|
}, function (_wasThrown, _result) {
|
|
1106
|
-
updateSubscriptions();
|
|
1108
|
+
if (! --updateRef.current) updateSubscriptions();
|
|
1107
1109
|
if (_wasThrown) throw _result;
|
|
1108
1110
|
return _result;
|
|
1109
1111
|
});
|
|
@@ -2263,7 +2265,7 @@ function CheckButtons(_ref) {
|
|
|
2263
2265
|
disabled: disabled,
|
|
2264
2266
|
checked: checked,
|
|
2265
2267
|
onChange: function onChange(x) {
|
|
2266
|
-
|
|
2268
|
+
!readonly && setChecked(control, o, x.target.checked);
|
|
2267
2269
|
}
|
|
2268
2270
|
}), /*#__PURE__*/React__default["default"].createElement("label", {
|
|
2269
2271
|
className: labelClass,
|