Sanity Library Reference Docs
    Preparing search index...

    Interface ObjectFormNode<T, S>

    interface ObjectFormNode<
        T = { [key in string]: unknown },
        S extends ObjectSchemaType = ObjectSchemaType,
    > {
        __unstable_computeDiff: ComputeDiff<ProvenanceDiffAnnotation>;
        changed: boolean;
        focused?: boolean;
        focusPath: Path;
        id: string;
        level: number;
        path: Path;
        readOnly?: boolean;
        schemaType: S;
        validation: FormNodeValidation[];
        value: T;
    }

    Type Parameters

    Index

    Properties

    __unstable_computeDiff: ComputeDiff<ProvenanceDiffAnnotation>

    A function that takes any value and produces a diff between that value and the value the node is being compared to.

    This can be used to compute a diff optimistically.

    This is marked as unstable because the API may need to evolve as we iterate on the advanced version control functionality. It will be stabilised when that project has matured.

    changed: boolean

    Whether the current value is different to the value the node is being compared to.

    focused?: boolean

    Whether the node is focused.

    focusPath: Path

    The focus path of the form node.

    id: string

    The unique identifier of the node.

    level: number

    The level of the node in the form hierarchy.

    path: Path

    The path of the node in the form hierarchy.

    readOnly?: boolean

    Whether the node is read-only.

    schemaType: S

    The schema type of the node.

    validation: FormNodeValidation[]

    The validation markers of the node.

    value: T

    The value of the node.