schema-components - v3.7.0
    Preparing search index...

    Interface RenderProps

    Props for React render functions. Extends BaseRenderProps with:

    • onChange — callback to propagate value changes back to state
    • renderChild — recursively renders a child field, threading onChange through the four-argument React signature
    interface RenderProps {
        value: unknown;
        readOnly: boolean;
        writeOnly: boolean;
        meta: SchemaMeta;
        constraints: AllConstraints;
        path: string;
        examples?: unknown[];
        tree: WalkedField;
        onChange: (value: unknown) => void;
        renderChild: (
            tree: WalkedField,
            value: unknown,
            onChange: (v: unknown) => void,
            pathSuffix?: string,
        ) => unknown;
    }

    Hierarchy (View Summary)

    Index

    Properties

    value: unknown

    Current field value.

    readOnly: boolean

    Whether to render as read-only display.

    writeOnly: boolean

    Whether to render as an empty input.

    Schema metadata for this field.

    constraints: AllConstraints

    Constraints from schema checks.

    path: string

    Dot-separated path from root (e.g. "address.city").

    examples?: unknown[]

    Example values from the schema's examples keyword.

    Walked field tree for recursive rendering.

    onChange: (value: unknown) => void

    Callback to update the field value.

    renderChild: (
        tree: WalkedField,
        value: unknown,
        onChange: (v: unknown) => void,
        pathSuffix?: string,
    ) => unknown

    Render a child field. Theme adapters call this to recursively render nested structures (object fields, array elements, union options). The resolver and rendering context are already wired in.

    Type Declaration

      • (
            tree: WalkedField,
            value: unknown,
            onChange: (v: unknown) => void,
            pathSuffix?: string,
        ): unknown
      • Parameters

        • tree: WalkedField

          The walked field tree for the child

        • value: unknown

          The child's current value

        • onChange: (v: unknown) => void

          Callback receiving the child's next value

        • OptionalpathSuffix: string

          Path segment from the parent (e.g. "city", "[0]"). Joined to the parent's path with a dot, or substituted when the parent acts as a transparent wrapper (union options). Required for every container — without it children inherit no path and inputId() will throw.

        Returns unknown