@astroapps/forms-core 1.2.0 → 1.2.2

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 CHANGED
@@ -1312,8 +1312,8 @@ function createValidators(def, context) {
1312
1312
  });
1313
1313
  }
1314
1314
  }
1315
- function setupValidation(controlImpl, definition, dataNode, schemaInterface, parent, formNode, runAsync) {
1316
- const validationEnabled = createScopedComputed(controlImpl, () => !definition.hidden);
1315
+ function setupValidation(controlImpl, definition, dataNode, schemaInterface, parent, formNode, hidden, runAsync) {
1316
+ const validationEnabled = createScopedComputed(controlImpl, () => !hidden.value);
1317
1317
  const validatorsScope = createCleanupScope();
1318
1318
  createEffect(() => {
1319
1319
  validatorsScope.cleanup();
@@ -1459,7 +1459,7 @@ function createFormState(schemaInterface, evaluators = defaultEvaluators) {
1459
1459
  updateComputedValue(dataNode, () => lookupDataNode(definition, parent));
1460
1460
  updateComputedValue(hidden, () => !!cf.hidden.value || definition.hidden || dataNode.value && (!validDataNode(dataNode.value) || hideDisplayOnly(dataNode.value, schemaInterface, definition)));
1461
1461
  updateComputedValue(readonly, () => !!cf.readonly.value || isControlReadonly(definition));
1462
- updateComputedValue(disabled, () => !!cf.disabled.value || isControlDisabled(definition));
1462
+ updateComputedValue(disabled, () => !!cf.disabled.value || of.disabled.value);
1463
1463
  updateComputedValue(variables, () => {
1464
1464
  var _controlImpl$fields$v2;
1465
1465
  return (_controlImpl$fields$v2 = controlImpl.fields.variables.value) != null ? _controlImpl$fields$v2 : {};
@@ -1481,7 +1481,7 @@ function createFormState(schemaInterface, evaluators = defaultEvaluators) {
1481
1481
  }
1482
1482
  }
1483
1483
  }, displayOverrides);
1484
- setupValidation(controlImpl, definition, dataNode, schemaInterface, parent, formNode, runAsync);
1484
+ setupValidation(controlImpl, definition, dataNode, schemaInterface, parent, formNode, hidden, runAsync);
1485
1485
  createSyncEffect(() => {
1486
1486
  var _dataNode$value;
1487
1487
  const dn = (_dataNode$value = dataNode.value) == null ? void 0 : _dataNode$value.control;