Sanity Library Reference Docs
    Preparing search index...

    Type Alias ReferenceTypeFilter

    ReferenceTypeFilter: (
        context: ReferenceTypeFilterContext,
        toTypes: ReferenceTypeOption[],
    ) => ReferenceTypeOption[]

    Function type for filtering which document types can be created from a reference field.

    The creationTypeFilter specifically controls the types available when clicking "Create new" in the reference input.

    This is distinct from the filter option, which controls which existing documents appear in search results.

    Type declaration