Sanity Library Reference Docs
    Preparing search index...

    Interface SearchOperatorBuilder<TType, TValue>Alpha

    interface SearchOperatorBuilder<TType extends string, TValue> {
        buttonValueComponent?: SearchOperatorButtonValue<TValue>;
        descriptionKey: `search.operator.${Lowercase<string>}.description`;
        groqFilter: (params: SearchOperatorParams<TValue>) => string;
        icon?: ComponentType;
        initialValue: TValue;
        inputComponent: SearchOperatorInput<TValue>;
        nameKey: `search.operator.${Lowercase<string>}.name`;
        type: TType;
    }

    Type Parameters

    • TType extends string
    • TValue

    Hierarchy (View Summary)

    Index

    Properties

    buttonValueComponent?: SearchOperatorButtonValue<TValue>
    descriptionKey: `search.operator.${Lowercase<string>}.description`

    i18n resource key for the "name", eg quantity is or contains

    groqFilter: (params: SearchOperatorParams<TValue>) => string
    icon?: ComponentType

    icon for explaining the operator (React component)

    initialValue: TValue
    inputComponent: SearchOperatorInput<TValue>
    nameKey: `search.operator.${Lowercase<string>}.name`

    i18n resource key for the "name", eg quantity is or contains

    type: TType

    name/type of operator, eg arrayCountEqual or numberGt