atomic-segmented-facet

This is for:

Developer
In this article

The atomic-segmented-facet displays a horizontal facet of the results for the current query.

Properties

Property Attribute Description Type Default

allowedValues

allowed-values

Specifies an explicit list of allowedValues in the Search API request. This list is in the form of a JSON string.

If you specify a list of values for this option, the facet only uses these values (if they are available in the current result set).

Example:

The following facet only uses the Contact, Account, and File values of the objecttype field. Even if the current result set contains other objecttype values, such as Message or Product, the facet does not use them.

<atomic-segmented-facet field="objecttype" allowed-values='["Contact","Account","File"]'></atomic-segmented-facet>

The maximum amount of allowed values is 25.

The default value is undefined, and the facet uses all available values for its field in the current result set.

string | string[]

'[]'

customSort

custom-sort

Identifies the facet values that must appear at the top, in this order. This parameter can be used in conjunction with the sortCriteria parameter.

Facet values not part of the customSort list will be sorted according to the sortCriteria.

Example:

The following facet will sort the Contact, Account, and File values at the top of the list for the objecttype field.

If there are more than these 3 values available, the rest of the list will be sorted using occurrences.

<atomic-segmented-facet field="objecttype" custom-sort='["Contact","Account","File"]' sort-criteria='occurrences'></atomic-segmented-facet>

The maximum amount of custom sort values is 25.

The default value is undefined, and the facet values will be sorted using only the sortCriteria.

string | string[]

'[]'

dependsOn

The required facets and values for this facet to be displayed. Examples:

<atomic-segmented-facet facet-id="abc" field="objecttype" ...></atomic-segmented-facet>

<!-- To show the facet when any value is selected in the facet with id "abc": -->
<atomic-segmented-facet
  depends-on-abc
  ...
></atomic-segmented-facet>

<!-- To show the facet when value "doc" is selected in the facet with id "abc": -->
<atomic-facet
  depends-on-abc="doc"
  ...
></atomic-segmented-facet>

{ [x: string]: string; }

{}

facetId

facet-id

Specifies a unique identifier for the facet.

string | undefined

field (required)

field

The field whose values you want to display in the facet.

string

filterFacetCount

filter-facet-count

Whether to exclude the parents of folded results when estimating the result count for each facet value.

boolean

true

injectionDepth

injection-depth

The maximum number of results to scan in the index to ensure that the facet lists all potential facet values. Note: A high injectionDepth may negatively impact the facet request performance. Minimum: 0 Default: 1000

number

1000

label

label

The non-localized label for the facet. Used in the atomic-breadbox component through the bindings store.

string | undefined

numberOfValues

number-of-values

The number of values to request for this facet. Also determines the number of additional values to request each time more values are shown.

number

6

sortCriteria

sort-criteria

The sort criterion to apply to the returned facet values. Possible values are 'score', 'alphanumeric', 'occurrences', and 'automatic'.

"alphanumeric" | "alphanumericDescending" | "automatic" | "occurrences" | "score"

'automatic'

tabsExcluded

tabs-excluded

The tabs on which this facet must not be displayed. This property should not be used at the same time as tabs-included.

Set this property as a stringified JSON array, e.g.,

 <atomic-timeframe-facet tabs-excluded='["tabIDA", "tabIDB"]'></atomic-timeframe-facet>

If you don’t set this property, the facet can be displayed on any tab. Otherwise, the facet won’t be displayed on any of the specified tabs.

string | string[]

'[]'

tabsIncluded

tabs-included

The tabs on which the facet can be displayed. This property should not be used at the same time as tabs-excluded.

Set this property as a stringified JSON array, e.g.,

 <atomic-timeframe-facet tabs-included='["tabIDA", "tabIDB"]'></atomic-timeframe-facet>

If you don’t set this property, the facet can be displayed on any tab. Otherwise, the facet can only be displayed on the specified tabs.

string | string[]

'[]'

Shadow Parts

Part Description

label

The facet value label.

placeholder

The placeholder displayed when the facet is loading.

segmented-container

The container that holds the segmented facets.

value-box

The facet value.

value-box-selected

The selected facet value.

values

The facet values container.