BreadcrumbManager (Insight Engine)

This is for:

Developer

The BreadcrumbManager headless controller manages a summary of the currently active facet filters.

Methods

deselectAll

Deselects all facet values.

deselectBreadcrumb

Deselects a breadcrumb value.

Parameters

subscribe

Adds a callback that’s invoked on state change.

Parameters

  • listener: () => void

    A callback that’s invoked on state change.

Returns Unsubscribe: A function to remove the listener.

Attributes

state

The state of the BreadcrumbManager controller.

Properties

  • categoryFacetBreadcrumbs: CategoryFacetBreadcrumb[]

    The list of category facet breadcrumbs.

  • dateFacetBreadcrumbs: Breadcrumb<DateFacetValue>

    The list of date facet breadcrumbs.

  • facetBreadcrumbs: Breadcrumb<FacetValue>

    The list of specific facet breadcrumbs.

  • hasBreadcrumbs: boolean

    Returns true if there are any available breadcrumbs (i.e., if there are any active facet values), and false if not.

  • numericFacetBreadcrumbs: Breadcrumb<NumericFacetValue>

    The list of numeric facet breadcrumbs.

  • staticFilterBreadcrumbs: StaticFilterBreadcrumb[]

    The list of static filter breadcrumbs.

Initialize

buildBreadcrumbManager

Creates an insight BreadcrumbManager controller instance.

Parameters

  • engine: InsightEngine

    The headless engine.

Returns BreadcrumbManager

CategoryFacetBreadcrumb

Properties

  • facetId: string

    The ID of the underlying facet.

  • field: string

    The field on which the underlying facet is configured.

  • path: CategoryFacetValue[]

    The complete path to the underlying facet value.

  • deselect: function

    A function that when called dispatches actions to deselect a breadcrumb value.

CategoryFacetValue

Properties

  • children: CategoryFacetValue[]

    The children of this facet value.

  • isLeafValue: boolean

    When the hierarchical value has no children, this property is true.

  • moreValuesAvailable: boolean

    Whether more facet values are available.

  • numberOfResults: number

    The number of results that match the facet value.

  • path: string[]

    The hierarchical path to the facet value.

  • state: 'idle' | 'selected' | 'excluded'

    Whether a facet value is filtering results (selected) or not (idle).

  • value: string

    The facet value.

DeselectableValue

Properties

  • deselect: function

    A function that when called dispatches actions to deselect a breadcrumb value.

StaticFilterBreadcrumb

Properties

  • id: string

    The ID of the underlying static filter.

  • values: StaticFilterBreadcrumbValue[]

    The list of static filter values currently selected.

Unsubscribe

Call signatures

  • (): void;