Skip to content

Commit 8311dbb

Browse files
committed
chore(changeset): patch @object-ui/plugin-map for the dataConfig memo fix
Part of #6018 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSoz9uGhaaSgiq3hshtN7L
1 parent 83e7405 commit 8311dbb

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎.changeset/wild-donkeys-shake.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
"@object-ui/plugin-map": patch
3+
---
4+
5+
`ObjectMap` no longer serializes its data config on every render.
6+
7+
`getDataConfig(schema)` was called bare in the render body and its result
8+
re-serialized with `JSON.stringify` on every render, purely to give `dataConfig`
9+
the stable identity its fetch effect depends on. `getDataConfig` is a pure
10+
function of `schema`, so `useMemo(() => getDataConfig(schema), [schema])` gives
11+
the same identity with no serialize and no per-render rebuild.
12+
13+
This also fixes a crash. `JSON.stringify` throws on a value it cannot serialize,
14+
and the config's passthrough branch returns the author's own `schema.data`
15+
object verbatim — inline rows included. A map handed inline records carrying a
16+
back-reference (an `$expand`-ed lookup) or a `BigInt` id threw from the render
17+
body and took the whole map subtree down with it. Comparing identities never
18+
serializes, so the config no longer has to be serializable at all.

0 commit comments

Comments
 (0)