@rebasepro/admin 0.13.0 → 0.13.1-canary.g394d868

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.
Files changed (137) hide show
  1. package/dist/{CollectionEditorDialog-CjXkWZ64.js → CollectionEditorDialog-D78xsXgL.js} +3 -3
  2. package/dist/{CollectionEditorDialog-CjXkWZ64.js.map → CollectionEditorDialog-D78xsXgL.js.map} +1 -1
  3. package/dist/{PropertyEditView-W8I3YV89.js → PropertyEditView-B88EC-1f.js} +2 -2
  4. package/dist/{PropertyEditView-W8I3YV89.js.map → PropertyEditView-B88EC-1f.js.map} +1 -1
  5. package/dist/{RouterCollectionsStudioView-BsLTNoqX.js → RouterCollectionsStudioView-B1Ws7h9l.js} +4 -4
  6. package/dist/{RouterCollectionsStudioView-BsLTNoqX.js.map → RouterCollectionsStudioView-B1Ws7h9l.js.map} +1 -1
  7. package/dist/collection_editor/serializable_types.d.ts +1 -0
  8. package/dist/collection_editor_ui.js +4 -4
  9. package/dist/components/AdditionalFieldValue.d.ts +25 -0
  10. package/dist/components/CollectionViewBinding/CollectionViewBinding.d.ts +16 -0
  11. package/dist/components/CollectionViewBinding/SlotValue.d.ts +63 -0
  12. package/dist/components/CollectionViewBinding/SplitListCloseButton.d.ts +17 -4
  13. package/dist/components/CollectionViewBinding/SplitListShowButton.d.ts +12 -0
  14. package/dist/components/CollectionViewBinding/usePreviewSlots.d.ts +55 -5
  15. package/dist/components/DetailViewBinding.d.ts +15 -0
  16. package/dist/components/DrawerNavigationGroup.d.ts +9 -6
  17. package/dist/components/DrawerNavigationItem.d.ts +16 -6
  18. package/dist/components/EditViewBinding.d.ts +30 -1
  19. package/dist/components/EntityDisplayHeader.d.ts +53 -0
  20. package/dist/components/EntityIdentityBar.d.ts +43 -1
  21. package/dist/components/EntityViewBinding.d.ts +60 -6
  22. package/dist/components/RebaseLayout.d.ts +1 -1
  23. package/dist/components/RebaseShell.d.ts +1 -1
  24. package/dist/components/RelationSelector.d.ts +8 -1
  25. package/dist/components/UserSelector.d.ts +8 -1
  26. package/dist/components/app/Scaffold.d.ts +9 -3
  27. package/dist/components/index.d.ts +2 -0
  28. package/dist/{export-J79rMoNj.js → export-BZhdWhkB.js} +2 -2
  29. package/dist/{export-J79rMoNj.js.map → export-BZhdWhkB.js.map} +1 -1
  30. package/dist/form/components/FieldBlock.d.ts +58 -4
  31. package/dist/form/components/FormRail.d.ts +13 -0
  32. package/dist/form/components/FormSections.d.ts +15 -1
  33. package/dist/form/components/useRailVisible.d.ts +5 -4
  34. package/dist/form/form_utils.d.ts +38 -1
  35. package/dist/{history-D7L_JlLO.js → history-BPpt68CL.js} +4 -4
  36. package/dist/{history-D7L_JlLO.js.map → history-BPpt68CL.js.map} +1 -1
  37. package/dist/hooks/useEntityDisplay.d.ts +102 -0
  38. package/dist/hooks/useEntityDisplayTitle.d.ts +18 -9
  39. package/dist/{import-BvYl--U4.js → import-gRfemegK.js} +3 -3
  40. package/dist/{import-BvYl--U4.js.map → import-gRfemegK.js.map} +1 -1
  41. package/dist/index.d.ts +2 -2
  42. package/dist/index.js +152 -57
  43. package/dist/index.js.map +1 -1
  44. package/dist/preview/compact_text.d.ts +23 -0
  45. package/dist/preview/components/BooleanPreview.d.ts +3 -1
  46. package/dist/preview/property_previews/ArrayOfStringsPreview.d.ts +1 -1
  47. package/dist/preview/property_previews/ArrayOneOfPreview.d.ts +1 -1
  48. package/dist/preview/property_previews/ArrayPropertyPreview.d.ts +1 -1
  49. package/dist/preview/property_previews/MapPropertyPreview.d.ts +1 -1
  50. package/dist/preview/property_previews/StringPropertyPreview.d.ts +1 -1
  51. package/dist/routes/RebaseRoute.d.ts +1 -1
  52. package/dist/types/components/PropertyPreviewProps.d.ts +19 -0
  53. package/dist/util/number_format.d.ts +14 -0
  54. package/dist/util/previews.d.ts +9 -2
  55. package/dist/{util-GiwPgxnL.js → util-BHq3VOjH.js} +9080 -7861
  56. package/dist/util-BHq3VOjH.js.map +1 -0
  57. package/package.json +9 -9
  58. package/src/collection_editor/serializable_types.ts +1 -0
  59. package/src/components/AdditionalFieldValue.tsx +68 -0
  60. package/src/components/CollectionTableBinding/CollectionTableBinding.tsx +7 -8
  61. package/src/components/CollectionTableBinding/PropertyTableCell.tsx +2 -2
  62. package/src/components/CollectionTableBinding/column_utils.tsx +15 -6
  63. package/src/components/CollectionTableBinding/internal/popup_field/PopupFormField.tsx +2 -2
  64. package/src/components/CollectionViewBinding/BoardCardBinding.tsx +26 -27
  65. package/src/components/CollectionViewBinding/CollectionListViewBinding.tsx +172 -112
  66. package/src/components/CollectionViewBinding/CollectionViewActions.tsx +1 -1
  67. package/src/components/CollectionViewBinding/CollectionViewBinding.tsx +38 -8
  68. package/src/components/CollectionViewBinding/EntityCardBinding.tsx +23 -36
  69. package/src/components/CollectionViewBinding/SlotValue.tsx +156 -0
  70. package/src/components/CollectionViewBinding/SplitListCloseButton.tsx +23 -7
  71. package/src/components/CollectionViewBinding/SplitListShowButton.tsx +28 -0
  72. package/src/components/CollectionViewBinding/SplitListView.tsx +33 -2
  73. package/src/components/CollectionViewBinding/useBoardDataController.tsx +12 -3
  74. package/src/components/CollectionViewBinding/usePreviewSlots.ts +177 -54
  75. package/src/components/DefaultDrawer.tsx +19 -23
  76. package/src/components/DetailViewBinding.tsx +87 -55
  77. package/src/components/DrawerNavigationGroup.tsx +16 -39
  78. package/src/components/DrawerNavigationItem.tsx +44 -16
  79. package/src/components/EditViewBinding.tsx +211 -41
  80. package/src/components/EntityDisplayHeader.tsx +170 -0
  81. package/src/components/EntityIdentityBar.tsx +149 -23
  82. package/src/components/EntityPreviewBinding.tsx +58 -18
  83. package/src/components/EntityViewBinding.tsx +342 -41
  84. package/src/components/InlineEntityPreview.tsx +10 -10
  85. package/src/components/RebaseLayout.tsx +2 -2
  86. package/src/components/RebaseShell.tsx +2 -2
  87. package/src/components/ReferenceTable/SelectionTableBinding.tsx +4 -2
  88. package/src/components/RelationSelector.tsx +15 -4
  89. package/src/components/SideDialogs.tsx +15 -3
  90. package/src/components/SidePanelBinding.tsx +122 -66
  91. package/src/components/UserSelector.tsx +15 -4
  92. package/src/components/app/Scaffold.tsx +112 -10
  93. package/src/components/index.ts +3 -0
  94. package/src/form/EntityForm.tsx +64 -52
  95. package/src/form/EntityFormBinding.tsx +24 -11
  96. package/src/form/PropertyFieldBinding.tsx +2 -2
  97. package/src/form/components/FieldBlock.tsx +80 -10
  98. package/src/form/components/FormRail.tsx +19 -2
  99. package/src/form/components/FormSections.tsx +32 -5
  100. package/src/form/components/StorageUploadProgress.tsx +9 -3
  101. package/src/form/components/useRailVisible.tsx +5 -4
  102. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +2 -2
  103. package/src/form/field_bindings/BinaryFieldBinding.tsx +10 -5
  104. package/src/form/field_bindings/BlockFieldBinding.tsx +3 -3
  105. package/src/form/field_bindings/GeopointFieldBinding.tsx +23 -16
  106. package/src/form/field_bindings/MapFieldBinding.tsx +2 -2
  107. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +13 -7
  108. package/src/form/field_bindings/MultiSelectFieldBinding.tsx +7 -1
  109. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +7 -1
  110. package/src/form/field_bindings/ReferenceFieldBinding.tsx +1 -1
  111. package/src/form/field_bindings/RelationFieldBinding.tsx +5 -2
  112. package/src/form/field_bindings/RepeatFieldBinding.tsx +3 -3
  113. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +2 -2
  114. package/src/form/field_bindings/UserSelectFieldBinding.tsx +4 -1
  115. package/src/form/field_bindings/VectorFieldBinding.tsx +6 -4
  116. package/src/form/form_utils.ts +78 -0
  117. package/src/hooks/navigation/useBuildCollectionRegistryController.tsx +29 -5
  118. package/src/hooks/useEntityDisplay.tsx +262 -0
  119. package/src/hooks/useEntityDisplayTitle.tsx +27 -38
  120. package/src/index.ts +9 -1
  121. package/src/preview/PropertyPreview.tsx +25 -5
  122. package/src/preview/compact_text.ts +68 -0
  123. package/src/preview/components/BooleanPreview.tsx +5 -2
  124. package/src/preview/components/StorageThumbnail.tsx +5 -2
  125. package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +6 -3
  126. package/src/preview/property_previews/ArrayOfStringsPreview.tsx +26 -1
  127. package/src/preview/property_previews/ArrayOneOfPreview.tsx +10 -1
  128. package/src/preview/property_previews/ArrayPropertyPreview.tsx +10 -1
  129. package/src/preview/property_previews/MapPropertyPreview.tsx +52 -1
  130. package/src/preview/property_previews/NumberPropertyPreview.tsx +9 -1
  131. package/src/preview/property_previews/StringPropertyPreview.tsx +8 -5
  132. package/src/routes/RebaseRoute.tsx +62 -4
  133. package/src/types/components/PropertyPreviewProps.tsx +21 -0
  134. package/src/util/number_format.ts +46 -0
  135. package/src/util/previews.ts +8 -55
  136. package/src/util/property_utils.tsx +6 -1
  137. package/dist/util-GiwPgxnL.js.map +0 -1
@@ -0,0 +1,156 @@
1
+ import React from "react";
2
+ import type { PreviewSize } from "../../types/components/PropertyPreviewProps";
3
+ import { PropertyPreview } from "../../preview";
4
+ import { StorageThumbnail } from "../../preview/components/StorageThumbnail";
5
+ import { UrlComponentPreview } from "../../preview/components/UrlComponentPreview";
6
+ import { Chip } from "@rebasepro/ui";
7
+ import type { PreviewSlot } from "./usePreviewSlots";
8
+
9
+ export interface SlotValueProps {
10
+ slot: PreviewSlot | undefined;
11
+ size: PreviewSize;
12
+ /**
13
+ * Relations and references render as one line of linked text rather than as
14
+ * a card. Defaults to true: a slot is a line in a row or a card, and a
15
+ * relation that renders its own bordered card there — with its own id line
16
+ * and its own side-panel button — is a card inside a card.
17
+ *
18
+ * Pass `false` only for a slot with room for one, which in practice is
19
+ * none of them.
20
+ */
21
+ textOnly?: boolean;
22
+ /** Images only: fill the container rather than fitting inside it. */
23
+ fill?: boolean;
24
+ }
25
+
26
+ /**
27
+ * One display slot, rendered.
28
+ *
29
+ * A slot's value arrives one of two ways and they cannot be rendered the same:
30
+ *
31
+ * - **From a property** — render it with that property's own preview, so an
32
+ * enum status keeps its colour, a date keeps its format and a storage path
33
+ * becomes a thumbnail. This is why a declared path beats a resolver whenever
34
+ * the value is actually on the record.
35
+ * - **From a resolver** — there is no property, because the value was computed
36
+ * or fetched. All that can be said about it is that it is text.
37
+ *
38
+ * The branch lives here, once, rather than at each of the fourteen places the
39
+ * list row, the card and the board card render a slot. That count is the reason:
40
+ * the last time a rule like this was inlined per call site, it drifted into
41
+ * seven versions.
42
+ */
43
+ export function SlotValue({ slot, size, textOnly = true, fill }: SlotValueProps) {
44
+
45
+ if (!slot || slot.value === undefined || slot.value === null) return null;
46
+
47
+ if (!slot.property || !slot.propertyKey) {
48
+ // A computed image is still an image. "There is no property, so all that
49
+ // can be said about it is that it is text" holds for a title and fails
50
+ // here: `display.image` accepts "a storage path or a URL … so a resolver
51
+ // may return either", and both used to be printed as their own string
52
+ // inside the image frame.
53
+ if (slot.role === "image" && typeof slot.value === "string" && slot.value.trim()) {
54
+ return <ComputedImage value={slot.value.trim()} size={size} fill={fill}/>;
55
+ }
56
+
57
+ // Computed. Arrays (a `tags` resolver) join rather than rendering as
58
+ // "[object Object]" via String().
59
+ const text = Array.isArray(slot.value)
60
+ ? slot.value.map(item => String(item)).join(", ")
61
+ : String(slot.value);
62
+ return <>{text}</>;
63
+ }
64
+
65
+ return <PropertyPreview
66
+ propertyKey={slot.propertyKey}
67
+ value={slot.value as never}
68
+ property={slot.property}
69
+ size={size}
70
+ textOnly={textOnly}
71
+ fill={fill}/>;
72
+ }
73
+
74
+ /**
75
+ * The `tags` slot, as chips beside the status.
76
+ *
77
+ * Honours both arms the same way the rest of the file does. A declared **path**
78
+ * goes through {@link SlotValue}, so an array of enum values keeps its own
79
+ * colours — that is the stated advantage of naming a property. A **resolver**
80
+ * returns bare strings with no property to render them as, so they become plain
81
+ * chips; a single string is accepted as one tag, which the role's type documents.
82
+ *
83
+ * Lives here rather than in the list, the card and the board card because that is
84
+ * three copies of the same decision, and this file exists to hold exactly one.
85
+ */
86
+ export function TagChips({ slot, max = 4 }: { slot: PreviewSlot, max?: number }) {
87
+
88
+ if (slot.property && slot.propertyKey) {
89
+ return <SlotValue slot={slot} size="small"/>;
90
+ }
91
+
92
+ const values = (Array.isArray(slot.value) ? slot.value : [slot.value])
93
+ .filter(item => item !== undefined && item !== null && String(item).trim() !== "")
94
+ .map(item => String(item));
95
+
96
+ if (values.length === 0) return null;
97
+
98
+ const shown = values.slice(0, max);
99
+ const hidden = values.length - shown.length;
100
+
101
+ return <>
102
+ {shown.map(value => (
103
+ <Chip key={value}
104
+ size="smallest"
105
+ className="!text-[10px] !leading-tight !py-0 shrink-0 max-w-[100px] truncate">
106
+ {value}
107
+ </Chip>
108
+ ))}
109
+ {hidden > 0 && (
110
+ <span className="text-[10px] text-surface-400 dark:text-surface-500 shrink-0">+{hidden}</span>
111
+ )}
112
+ </>;
113
+ }
114
+
115
+ /**
116
+ * Whether a computed image string can be fetched as-is, or has to be resolved
117
+ * through storage first.
118
+ *
119
+ * Exported because it is the whole decision: rendering either branch needs a
120
+ * provider (a storage source, a DOM), and the thing worth pinning is which
121
+ * branch a given string takes. `//host/x` is protocol-relative and equally
122
+ * fetchable; `data:` and `blob:` are already the bytes.
123
+ */
124
+ export function isFetchableImageUrl(value: string): boolean {
125
+ return /^(https?:)?\/\//i.test(value) || /^(data|blob):/i.test(value);
126
+ }
127
+
128
+ /**
129
+ * A string a resolver returned for the `image` role, rendered as a picture.
130
+ *
131
+ * Two things can arrive here and they need different handling, which is the whole
132
+ * reason a property-path image is preferable: a storage property knows which
133
+ * backend holds it, and a bare string does not.
134
+ *
135
+ * - An **absolute URL** is already fetchable. Rendering it through the storage
136
+ * layer would ask a bucket to sign a path that was never in it.
137
+ * - Anything else is read as a **storage path** on the default source, which is
138
+ * the only source a value with no property can be attributed to. A resolver
139
+ * pointing at a named source should name the property instead.
140
+ */
141
+ function ComputedImage({ value, size, fill }: { value: string, size: PreviewSize, fill?: boolean }) {
142
+ const isAbsolute = isFetchableImageUrl(value);
143
+
144
+ if (isAbsolute) {
145
+ return <UrlComponentPreview previewType="image"
146
+ url={value}
147
+ size={size}
148
+ fill={fill}
149
+ hint={value}/>;
150
+ }
151
+
152
+ return <StorageThumbnail storagePathOrDownloadUrl={value}
153
+ storeUrl={false}
154
+ size={size}
155
+ fill={fill}/>;
156
+ }
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
 
3
- import { IconButton, iconSize, Tooltip, XIcon } from "@rebasepro/ui";
3
+ import { IconButton, iconSize, PanelLeftCloseIcon, Tooltip } from "@rebasepro/ui";
4
4
  import { useTranslation } from "@rebasepro/app";
5
5
 
6
6
  import { useSplitView } from "./SplitViewContext";
@@ -9,11 +9,24 @@ import { useSplitView } from "./SplitViewContext";
9
9
  * Closes the list of a split view, leaving the open record on its own.
10
10
  *
11
11
  * It leads the record's own app bar, where the breadcrumb starts — this is the
12
- * entity pane's old "Open full screen" button, moved to that edge and wearing an
13
- * X: closing the list and opening the record full screen are the same thing, so
14
- * there is one control and one route (`#full`) rather than two.
12
+ * entity pane's old "Open full screen" button, moved to that edge: closing the
13
+ * list and opening the record full screen are the same thing, so there is one
14
+ * control and one route (`#full`) rather than two. Full screen carries the
15
+ * mirrored icon to bring the list back.
16
+ *
17
+ * A pane glyph rather than the double chevron it wore first. Now that the bar
18
+ * ends in a ✕ that dismisses the record, an arrow pointing off the left edge of
19
+ * the record's own bar was the other thing on it that read as "close me" — and
20
+ * it is the one control here that does not act on the record at all.
15
21
  */
16
- export function SplitListCloseButton() {
22
+ export function SplitListCloseButton({ onBeforeHide }: {
23
+ /**
24
+ * Run before the layout changes, while this form is still mounted: the edit
25
+ * view uses it to hand its edit in progress to the full-screen form that is
26
+ * about to show the same record.
27
+ */
28
+ onBeforeHide?: () => void;
29
+ } = {}) {
17
30
 
18
31
  const { t } = useTranslation();
19
32
  const splitView = useSplitView();
@@ -24,9 +37,12 @@ export function SplitListCloseButton() {
24
37
  <Tooltip title={t("hide_list")}>
25
38
  <IconButton
26
39
  size="small"
27
- onClick={splitView.openFullScreen}
40
+ onClick={() => {
41
+ onBeforeHide?.();
42
+ splitView.openFullScreen();
43
+ }}
28
44
  aria-label={t("hide_list")}>
29
- <XIcon size={iconSize.smallest}/>
45
+ <PanelLeftCloseIcon size={iconSize.smallest}/>
30
46
  </IconButton>
31
47
  </Tooltip>
32
48
  );
@@ -0,0 +1,28 @@
1
+ import React from "react";
2
+
3
+ import { IconButton, iconSize, PanelLeftOpenIcon, Tooltip } from "@rebasepro/ui";
4
+ import { useTranslation } from "@rebasepro/app";
5
+
6
+ /**
7
+ * Brings the list back beside a record that was opened full screen.
8
+ *
9
+ * The mirror of {@link SplitListCloseButton}: the same edge of the same bar,
10
+ * the same pane glyph opening rather than closing, and the same single route —
11
+ * showing the list is dropping the `#full` hash. It replaces the back arrow
12
+ * where it applies, because the list it unfolds already holds the record.
13
+ */
14
+ export function SplitListShowButton({ onClick }: { onClick: () => void }) {
15
+
16
+ const { t } = useTranslation();
17
+
18
+ return (
19
+ <Tooltip title={t("show_list")}>
20
+ <IconButton
21
+ size="small"
22
+ onClick={onClick}
23
+ aria-label={t("show_list")}>
24
+ <PanelLeftOpenIcon size={iconSize.smallest}/>
25
+ </IconButton>
26
+ </Tooltip>
27
+ );
28
+ }
@@ -79,6 +79,19 @@ function isListShortcutTarget(target: HTMLElement | null, detailPanel: HTMLEleme
79
79
  return !detailPanel?.contains(target);
80
80
  }
81
81
 
82
+ /**
83
+ * The list's share of the split, as a percentage, before anyone drags it.
84
+ *
85
+ * The list only has to identify a record — a title, a subtitle and a status
86
+ * chip — while the detail beside it carries the whole record and its rail. At
87
+ * 30% the list was taking width from the side that had four columns of fields
88
+ * to lay out.
89
+ *
90
+ * A default, not a constraint: {@link savePanelSize} remembers the drag per
91
+ * collection, so anyone who has already sized this list keeps their size.
92
+ */
93
+ const DEFAULT_PANEL_SIZE = 26;
94
+
82
95
  function getSavedPanelSize(path: string): number {
83
96
  try {
84
97
  const saved = localStorage.getItem(`${PANEL_SIZE_KEY}_${path}`);
@@ -87,7 +100,7 @@ function getSavedPanelSize(path: string): number {
87
100
  if (!isNaN(val) && val > 0 && val < 100) return val;
88
101
  }
89
102
  } catch { /* ignore */ }
90
- return 30;
103
+ return DEFAULT_PANEL_SIZE;
91
104
  }
92
105
 
93
106
  function savePanelSize(path: string, size: number) {
@@ -150,8 +163,20 @@ export function SplitListView<M extends Record<string, unknown> = Record<string,
150
163
  dirty.current = modified;
151
164
  }, []);
152
165
 
153
- // The form remounts per entity, so its dirty state must not leak into the next one.
166
+ // The form remounts per entity, so its dirty state must not leak into the
167
+ // next one — and it has to be cleared here rather than left to the next
168
+ // form's own first report, because that form spends the load in a skeleton
169
+ // and a navigation during it would prompt about the record before it.
170
+ //
171
+ // On a *change* of record only, never on this view's own mount: a record
172
+ // arriving from full screen carries its edit back in and opens dirty, and
173
+ // the form says so from its first effect — which runs before this one, being
174
+ // a child's. Clearing unconditionally overwrote that report with `false`,
175
+ // and the way out of the split stopped asking about a live edit.
176
+ const previousEntityId = useRef(selectedEntityId);
154
177
  useEffect(() => {
178
+ if (previousEntityId.current === selectedEntityId) return;
179
+ previousEntityId.current = selectedEntityId;
155
180
  dirty.current = false;
156
181
  }, [selectedEntityId]);
157
182
 
@@ -366,6 +391,7 @@ export function SplitListView<M extends Record<string, unknown> = Record<string,
366
391
  parentEntityIds={usedParentEntityIds}
367
392
  selectedTab={selectedTab}
368
393
  layout="split"
394
+ onCloseRequest={handleCloseDetail}
369
395
  onEditClick={() => {
370
396
  navigate(buildUrl(`${path}/${renderedEntityId}/edit`));
371
397
  }}
@@ -387,6 +413,11 @@ export function SplitListView<M extends Record<string, unknown> = Record<string,
387
413
  parentEntityIds={usedParentEntityIds}
388
414
  selectedTab={selectedTab}
389
415
  layout="split"
416
+ // The ✕, and where "save and close" lands. A plain
417
+ // navigation: `useNavigationBlocker` above already
418
+ // stands between it and an unsaved edit, so the ✕ asks
419
+ // exactly what Escape and the browser's Back ask.
420
+ onCloseRequest={handleCloseDetail}
390
421
  onValuesModified={setDirty}
391
422
  onSaved={() => {
392
423
  setDirty(false);
@@ -408,7 +408,8 @@ values: { ...e.values,
408
408
  where: whereFilter,
409
409
  limit: itemCount,
410
410
  orderBy: orderByParam,
411
- include: includeParams
411
+ include: includeParams,
412
+ searchString: currentSearchString
412
413
  });
413
414
 
414
415
  const onError = (error: Error) => {
@@ -446,7 +447,12 @@ values: { ...e.values,
446
447
  where: whereFilter,
447
448
  limit: itemCount,
448
449
  orderBy: orderByParam,
449
- include: includeParams
450
+ include: includeParams,
451
+ // Read into a local at the top of this function and then used
452
+ // nowhere, in both places it was read. The board took a search
453
+ // term, re-subscribed every column when it changed, and
454
+ // returned the same rows.
455
+ searchString: currentSearchString
450
456
  }, res => {
451
457
  liveDataReceived = true;
452
458
  onUpdate(res.data as Entity<M>[]);
@@ -539,7 +545,10 @@ values: { ...e.values,
539
545
  };
540
546
 
541
547
  accessor.count({
542
- where: whereFilter
548
+ where: whereFilter,
549
+ // Or the column header counts the unsearched collection
550
+ // while the column beneath it shows searched rows.
551
+ searchString: currentSearchString
543
552
  }).then(count => {
544
553
  if (isCleaningUpRef.current) return;
545
554
  setColumnData(prev => ({