BreadcrumbManager (Insight Engine)
BreadcrumbManager (Insight Engine)
This is for:
DeveloperThe BreadcrumbManager
headless controller manages a summary of the currently active facet filters.
Methods
deselectAll
Deselects all facet values.
deselectBreadcrumb
Deselects a breadcrumb value.
Parameters
-
value:
DeselectableValue
The breadcrumb value to deselect.
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), andfalse
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
Related Types
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
: functionA 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
: functionA 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;