@ai-matrx/records-ui 0.101.27 → 0.101.28

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/dist/index.js CHANGED
@@ -13382,6 +13382,14 @@ function asField(f) {
13382
13382
  relation_target: f.relation_target ?? null
13383
13383
  };
13384
13384
  }
13385
+ function CustomValue({ field: field2, value }) {
13386
+ const choice = isChoiceField(field2);
13387
+ const index = useChoiceOptions(choice ? [field2] : [], choice ? [field2.key] : []);
13388
+ const options = index.get(field2.key);
13389
+ if (!choice || !options) return renderValue(field2, value);
13390
+ const worded = (v) => optionFor(options, v)?.label ?? v;
13391
+ return renderValue(field2, Array.isArray(value) ? value.map(worded) : worded(value));
13392
+ }
13385
13393
  function CustomFieldsSection({
13386
13394
  entityToken,
13387
13395
  recordId,
@@ -13701,7 +13709,7 @@ function CustomFieldsSection({
13701
13709
  setCellValue(values[f.key]);
13702
13710
  setCellKey(f.key);
13703
13711
  },
13704
- children: isEmptyValue(values[f.key]) ? /* @__PURE__ */ jsx47("span", { className: "text-muted-foreground", children: "\u2014" }) : renderValue(asField(f), values[f.key])
13712
+ children: isEmptyValue(values[f.key]) ? /* @__PURE__ */ jsx47("span", { className: "text-muted-foreground", children: "\u2014" }) : /* @__PURE__ */ jsx47(CustomValue, { field: asField(f), value: values[f.key] })
13705
13713
  }
13706
13714
  ) })
13707
13715
  ] }, f.id)) })