@react-typed-forms/schemas 11.9.0 → 11.10.0

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
@@ -1598,8 +1598,14 @@ function defaultDataProps(_ref4) {
1598
1598
  control: control,
1599
1599
  field: field,
1600
1600
  id: "c" + control.uniqueId,
1601
- options: fieldOptions && allowed.length > 0 ? fieldOptions.filter(function (x) {
1602
- return allowed.includes(x.value);
1601
+ options: allowed.length > 0 ? allowed.map(function (x) {
1602
+ var _fieldOptions$find;
1603
+ return typeof x === "object" ? x : (_fieldOptions$find = fieldOptions == null ? void 0 : fieldOptions.find(function (y) {
1604
+ return y.value == x;
1605
+ })) != null ? _fieldOptions$find : {
1606
+ name: x.toString(),
1607
+ value: x
1608
+ };
1603
1609
  }) : fieldOptions,
1604
1610
  readonly: !!formOptions.readonly,
1605
1611
  renderOptions: (_definition$renderOpt = definition.renderOptions) != null ? _definition$renderOpt : {