@ai-matrx/records-ui 0.52.0 → 0.53.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/dist/index.js CHANGED
@@ -6250,6 +6250,7 @@ function Card({
6250
6250
 
6251
6251
  // src/ViewSwitcher.tsx
6252
6252
  import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
6253
+ var NO_FIELDS = [];
6253
6254
  function useViewRecords(view, pageSize = 200) {
6254
6255
  const client = useRecordsClient16();
6255
6256
  const table = useRecords4(view.ruleId ? null : view.subject, { pageSize });
@@ -6619,7 +6620,12 @@ function Card2({
6619
6620
  onOpenRecord
6620
6621
  }) {
6621
6622
  const host = useRecordsUi();
6622
- const label = field ? scalarText(field, (record.document ?? {})[field.key]) : rowName(record, null, "Untitled");
6623
+ const wanted = useMemo17(
6624
+ () => field && pointsAtRecords(field) ? [field] : NO_FIELDS,
6625
+ [field]
6626
+ );
6627
+ const labels = useRecordLabels(wanted);
6628
+ const label = field ? scalarText(field, (record.document ?? {})[field.key], labels) : rowName(record, null, "Untitled");
6623
6629
  return /* @__PURE__ */ jsx25(
6624
6630
  "button",
6625
6631
  {