Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
perf: remove form state network requests #16446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
perf: remove form state network requests #16446
Changes from 1 commit
e64f7e3161db2d15cb8019fe88c51f03c268bf1f128cd6cd8945ffbec90cda0a2b3a6708dac6c560e0d64fb5cec666571f88222edc398d43d991e3e72f190def371987d2d4d92ffd361a19cfc68e91bc7f41b21ea81df6efa5ad6051ee787295a2e48d25780e2f67712abf2dec21a314e73c9cc39de072c0182832488a44ffbfd2a379e25f25b07f1a84b08ee027e8a5d4a4f84e1c69789c189ac57afcc0c5c30a2e499ad46fdc405a5f4b047314c4e073f49e80120b4687ada8dd880cd0e8974afbb61a62430bd7eaeb81044524ed09fcf01145fc71786f721194e77552358b42585607b0f12478b7bec5ec86c7f352b0ce0fe790f175f948c18d10580c90540d35ba5900dfdf33959cf648d4f1e7bd1fbd94d48ce37c09014119906b6f4d5d2336bFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
…rver Field components Three bugs surface together when an array adds a row whose inner field has admin.components.Field set to a server component: 1. Slug mismatch: server-side componentIndex paths are entity-slug prefixed ('arrays.serverArray.*.text'), but client-side dispatch uses formState-relative paths ('serverArray.0.text'). The render-fields request landed on the server with slug-stripped paths, componentsAt() segment-prefix match failed, every target produced 'No registered component'. Fix on the client side: re-prefix paths going out, strip on the way back. 2. renderSingleField was too narrow: it built minimal serverProps without clientField, field schema, schemaMap, etc. Custom Field components that wrap a base @payloadcms/ui field (TextField, NumberField, etc.) crashed destructuring 'admin' from undefined. Replace it with a proper call into renderField (the same path used for initial form- state construction), wired through getSchemaMap + getClientSchemaMap so server custom fields receive everything the legacy renderer gives them. renderSingleField was unused outside renderFields, so it's removed. 3. renderField.tsx uses JSX without 'import React' — fine in Next.js where React is global, fatal in non-Next callers (vitest int tests, the new render-fields path through renderField). Add the React import. The eslint-unused-vars override is intentional; tsc preserves the binding so the classic JSX runtime can resolve 'React.createElement'. Verified in browser: Add Server Array fires render-fields with {path: arrays.serverArray.0.text, slot: Field}, server executes ServerTextField (pid + hostname proof), default Field never replaces it on heartbeat. All form-state int tests (37) and unit tests (1409 + 39 react) pass.Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.