Skip to content

Commit e1178e9

Browse files
committed
docs(changeset): guard an absent object name in the useRelatedCount migration
Claude-Session: https://claude.ai/code/session_01L6bhgWd23yaWptSYazSPUo Co-authored-by: Claude <noreply@anthropic.com>
1 parent ecad190 commit e1178e9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎.changeset/25921-components-helpers-and-family-heads.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ What leaves, and what to write instead:
4747
- FROM `NativeSelect` TO a plain `select` element, or `Select`.
4848
- FROM `NativeSelectProps` TO `React.SelectHTMLAttributes<HTMLSelectElement>`, which it extended without adding a key.
4949
- FROM `ResizableHandleProps` TO `React.ComponentProps<typeof ResizableHandle>`, which it aliased.
50-
- FROM `useRelatedCount` TO `RelatedCountStore.get` with the same four arguments (object, relationship field, parent id, filter), read in a component that calls `useRelatedCountVersion()`, which re-renders it when the store changes.
50+
- FROM `useRelatedCount` TO `RelatedCountStore.get` with the same four arguments (object, relationship field, parent id, filter), guarding an absent object name yourself as the hook did (`objectName ? RelatedCountStore.get(objectName, relField, parentId, filter) : undefined`, since `get` takes `objectName: string`), read in a component that calls `useRelatedCountVersion()`, which re-renders it when the store changes.
5151
- FROM `mountedOperatorValue`, `retypeFilterValue`, `narrowFilterValueToOptions` TO `FilterBuilder`, which applies them to its rows, or `reshapeFilterValue` for the operator half.
5252
- FROM `CURRENCY_COMPANION_SUFFIX`, `currencyCompanionId`, `currencyCompanionOf`, `pairedCurrencyField` TO `isCurrencyCompanion` and `syncRecordCurrencyRows`, which pair and keep the currency rows.
5353
- FROM `KbdGroup` TO a `kbd` element with the classes `inline-flex items-center gap-1` around the `Kbd` elements.

0 commit comments

Comments
 (0)