Sanity Library Reference Docs
    Preparing search index...

    Interface FormBuilderPropsAlpha

    interface FormBuilderProps {
        autoFocus?: boolean;
        changed: boolean;
        changesOpen?: boolean;
        collapsedFieldSets: StateTree<boolean>;
        collapsedPaths: StateTree<boolean>;
        focused: boolean;
        focusPath: Path;
        id: string;
        onChange: (changeEvent: PatchEvent) => void;
        onFieldGroupSelect: (path: Path, groupName: string) => void;
        onPathBlur: (path: Path) => void;
        onPathFocus: (path: Path) => void;
        onPathOpen: (path: Path) => void;
        onSetFieldSetCollapsed: (path: Path, collapsed: boolean) => void;
        onSetPathCollapsed: (path: Path, collapsed: boolean) => void;
        openPath?: Path;
        presence: FormNodePresence[];
        readOnly?: boolean;
        schemaType: ObjectSchemaType;
        validation: ValidationMarker[];
        value: FormDocumentValue;
    }

    Hierarchy

    • Omit<
          ObjectFormNode,
          "level"
          | "path"
          | "presence"
          | "validation"
          | "_allMembers",
      >
      • FormBuilderProps
    Index

    Properties

    autoFocus?: boolean
    changed: boolean

    Whether the node has changes in a draft.

    changesOpen?: boolean
    collapsedFieldSets: StateTree<boolean>
    collapsedPaths: StateTree<boolean>
    focused: boolean

    Whether the node is focused.

    focusPath: Path

    The focus path of the form node.

    id: string

    The unique identifier of the node.

    onChange: (changeEvent: PatchEvent) => void
    onFieldGroupSelect: (path: Path, groupName: string) => void
    onPathBlur: (path: Path) => void
    onPathFocus: (path: Path) => void
    onPathOpen: (path: Path) => void
    onSetFieldSetCollapsed: (path: Path, collapsed: boolean) => void
    onSetPathCollapsed: (path: Path, collapsed: boolean) => void
    openPath?: Path
    presence: FormNodePresence[]
    readOnly?: boolean

    Whether the node is read-only.

    schemaType: ObjectSchemaType

    The schema type of the node.

    validation: ValidationMarker[]
    value: FormDocumentValue

    The value of the node.