Interface AnyFacetValuesCondition<T>

interface AnyFacetValuesCondition<T extends AnyFacetValueRequest> {
    parentFacetId: string;
    condition(parentValues: T[]): boolean;
}

Type Parameters

Methods

Properties

Methods

  • A callback function that must evaluate to true for the condition to be met.

    Parameters

    • parentValues: T[]

      The current values of the facet whose facetId is the parentFacetId value.

    Returns boolean

    Whether the condition is met.

    const fileTypeHasSomeSelectedValue: AnyFacetValueCondition<FacetValueRequest> = {
    parentFacetId: 'filetype',
    condition: (parentValues) => parentValues.some(value => value.state === 'selected')
    }

    .

Properties

parentFacetId: string

The facetId of the facet whose values are used as input by the condition.