@onehat/ui 0.3.89 → 0.3.90

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.89",
3
+ "version": "0.3.90",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -508,7 +508,9 @@ function Form(props) {
508
508
  if (validator?.fields && validator.fields[name]?.exclusiveTests?.required) {
509
509
  isRequired = true;
510
510
  }
511
- } else if (propertyDef?.validator?.spec && !propertyDef.validator.spec.optional) {
511
+ } else if ((propertyDef?.validator?.spec && !propertyDef.validator.spec.optional) ||
512
+ (propertyDef?.requiredIfPhantom && isPhantom) ||
513
+ (propertyDef?.requiredIfNotPhantom && !isPhantom)) {
512
514
  // property definition
513
515
  isRequired = true;
514
516
  }