Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
35 lines
1.3 KiB
Plaintext
35 lines
1.3 KiB
Plaintext
import { type Field, type FieldState, type ServerFunction } from 'payload';
|
|
export type RenderFieldServerFnArgs<TField = Field> = {
|
|
/**
|
|
* Override field config pulled from schemaPath lookup
|
|
*/
|
|
field?: Partial<TField>;
|
|
/**
|
|
* Pass the value this field will receive when rendering it on the server.
|
|
* For richText, this helps provide initial state for sub-fields that are immediately rendered (like blocks)
|
|
* so that we can avoid multiple waterfall requests for each block that renders on the client.
|
|
*/
|
|
initialValue?: unknown;
|
|
/**
|
|
* Path to the field to render
|
|
* @default field name
|
|
*/
|
|
path?: string;
|
|
/**
|
|
* Dot schema path to a richText field declared in your config.
|
|
* Format:
|
|
* "collection.<collectionSlug>.<fieldPath>"
|
|
* "global.<globalSlug>.<fieldPath>"
|
|
*
|
|
* Examples:
|
|
* "collection.posts.richText"
|
|
* "global.siteSettings.content"
|
|
*/
|
|
schemaPath: string;
|
|
};
|
|
export type RenderFieldServerFnReturnType = {} & FieldState['customComponents'];
|
|
/**
|
|
* @experimental - may break in minor releases
|
|
*/
|
|
export declare const _internal_renderFieldHandler: ServerFunction<RenderFieldServerFnArgs, Promise<RenderFieldServerFnReturnType>>;
|
|
//# sourceMappingURL=renderFieldServerFn.d.ts.map |