# Coveo DynamicFacet Component (CoveoDynamicFacet)

## Index

### Methods

- collapse
- debugInfo
- deselectMultipleValues
- deselectValue
- disable
- enable
- enableFreezeCurrentValuesFlag
- enableFreezeFacetOrderFlag
- expand
- getBindings
- getCaptionForStringValue
- hasSelectedValue
- reset
- selectMultipleValues
- selectValue
- showLessValues
- showMoreValues
- toggleCollapse
- toggleSelectValue
- get

### Properties

- bind
- componentOptionsModel
- componentStateModel
- disabled
- logger
- queryController
- queryStateModel
- root
- searchInterface
- ID

### Accessors

- usageAnalytics

### Component Options

- collapsedByDefault
- customSort
- dependsOn
- dependsOnCondition
- enableCollapse
- enableFacetSearch
- enableMoreLess
- enableScrollToTop
- field
- filterFacetCount
- id
- includeInBreadcrumb
- injectionDepth
- numberOfValues
- numberOfValuesInBreadcrumb
- sortCriteria
- title
- useLeadingWildcardInFacetSearch
- valueCaption

### Constructors

- constructor

## Methods

### collapse

- collapse(): void

- - Defined in ui/DynamicFacet/DynamicFacet.ts :524

  #### Returns void

### debugInfo

- debugInfo(): any

- Inherited from BaseComponent.debugInfo

  - Defined in ui/Base/BaseComponent.ts :41

  #### Returns any

### deselectMultipleValues

- deselectMultipleValues(values: string[]): void

- - Defined in ui/DynamicFacet/DynamicFacet.ts :419

  #### Parameters

  - ##### values: string[]

  #### Returns void

### deselectValue

- deselectValue(value: string): void

- - Defined in ui/DynamicFacet/DynamicFacet.ts :398

  #### Parameters

  - ##### value: string

  #### Returns void

### disable

- disable(): void

- Inherited from BaseComponent.disable

  - Defined in ui/Base/BaseComponent.ts :52

  #### Returns void

### enable

- enable(): void

- Inherited from BaseComponent.enable

  - Defined in ui/Base/BaseComponent.ts :61

  #### Returns void

### enableFreezeCurrentValuesFlag

- enableFreezeCurrentValuesFlag(): void

- - Defined in ui/DynamicFacet/DynamicFacet.ts :544

  #### Returns void

### enableFreezeFacetOrderFlag

- enableFreezeFacetOrderFlag(): void

- - Defined in ui/DynamicFacet/DynamicFacet.ts :557

  #### Returns void

### expand

- expand(): void

- - Defined in ui/DynamicFacet/DynamicFacet.ts :508

  #### Returns void

### getBindings

- getBindings(): IComponentBindings

- Inherited from Component.getBindings

  - Defined in ui/Base/Component.ts :328

  #### Returns IComponentBindings

### getCaptionForStringValue

- getCaptionForStringValue(value: string): string

- - Defined in ui/DynamicFacet/DynamicFacet.ts :450

  #### Parameters

  - ##### value: string

  #### Returns string

### hasSelectedValue

- hasSelectedValue(value: string): boolean

- - Defined in ui/DynamicFacet/DynamicFacet.ts :407

  #### Parameters

  - ##### value: string

  #### Returns boolean

### reset

- reset(): void

- - Defined in ui/DynamicFacet/DynamicFacet.ts :486

  #### Returns void

### selectMultipleValues

- selectMultipleValues(values: string[]): void

- - Defined in ui/DynamicFacet/DynamicFacet.ts :380

  #### Parameters

  - ##### values: string[]

  #### Returns void

### selectValue

- selectValue(value: string): void

- - Defined in ui/DynamicFacet/DynamicFacet.ts :367

  #### Parameters

  - ##### value: string

  #### Returns void

### showLessValues

- showLessValues(): void

- - Defined in ui/DynamicFacet/DynamicFacet.ts :472

  #### Returns void

### showMoreValues

- showMoreValues(additionalNumberOfValues?: number): void

- - Defined in ui/DynamicFacet/DynamicFacet.ts :460

  #### Parameters

  - ##### Default value additionalNumberOfValues: number = this.options.numberOfValues

  #### Returns void

### toggleCollapse

- toggleCollapse(): void

- - Defined in ui/DynamicFacet/DynamicFacet.ts :501

  #### Returns void

### toggleSelectValue

- toggleSelectValue(value: string): void

- - Defined in ui/DynamicFacet/DynamicFacet.ts :436

  #### Parameters

  - ##### value: string

  #### Returns void

### Static get

- get(element: HTMLElement, componentClass?: any, noThrow?: boolean): BaseComponent

- Inherited from Component.get

  - Defined in ui/Base/Component.ts :410

  #### Parameters

  - ##### element: HTMLElement

  - ##### Optional componentClass: any

  - ##### Optional noThrow: boolean

  #### Returns BaseComponent

## Properties

### bind

bind: ComponentEvents

Inherited from Component.bind

- Defined in ui/Base/Component.ts :270

### componentOptionsModel

componentOptionsModel: ComponentOptionsModel

Inherited from Component.componentOptionsModel

- Defined in ui/Base/Component.ts :294

### componentStateModel

componentStateModel: ComponentStateModel

Inherited from Component.componentStateModel

- Defined in ui/Base/Component.ts :282

### disabled

disabled: boolean

Inherited from BaseComponent.disabled

- Defined in ui/Base/BaseComponent.ts :23

### logger

logger: Logger

Inherited from BaseComponent.logger

- Defined in ui/Base/BaseComponent.ts :18

### queryController

queryController: QueryController

Inherited from Component.queryController

- Defined in ui/Base/Component.ts :286

### queryStateModel

queryStateModel: QueryStateModel

Inherited from Component.queryStateModel

- Defined in ui/Base/Component.ts :278

### root

root: HTMLElement

Inherited from Component.root

- Defined in ui/Base/Component.ts :274

### searchInterface

searchInterface: SearchInterface

Inherited from Component.searchInterface

- Defined in ui/Base/Component.ts :290

### Static ID

ID: string

Inherited from BaseComponent.ID

- Defined in ui/Base/BaseComponent.ts :28

## Accessors

### usageAnalytics

usageAnalytics:

Inherited from Component.usageAnalytics

- Defined in ui/Base/Component.ts :343

## Component Options

### collapsedByDefault

collapsedByDefault: boolean

- Defined in ui/DynamicFacet/DynamicFacet.ts :226

Markup configuration example(s) :

    data-collapsed-by-default='true'
    data-collapsed-by-default='false'

### customSort

customSort: string[]

- Defined in ui/DynamicFacet/DynamicFacet.ts :173

### dependsOn

dependsOn: string

- Defined in ui/DynamicFacet/DynamicFacet.ts :264

Markup configuration example(s) :

    data-depends-on='document-type-facet'

### dependsOnCondition

dependsOnCondition: IDependentFacetCondition

- Defined in ui/DynamicFacet/DynamicFacet.ts :278

### enableCollapse

enableCollapse: boolean

- Defined in ui/DynamicFacet/DynamicFacet.ts :186

Markup configuration example(s) :

    data-enable-collapse='true'
    data-enable-collapse='false'

### enableFacetSearch

enableFacetSearch: boolean

- Defined in ui/DynamicFacet/DynamicFacet.ts :210

Markup configuration example(s) :

    data-enable-facet-search='true'
    data-enable-facet-search='false'

### enableMoreLess

enableMoreLess: boolean

- Defined in ui/DynamicFacet/DynamicFacet.ts :198

Markup configuration example(s) :

    data-enable-more-less='true'
    data-enable-more-less='false'

### enableScrollToTop

enableScrollToTop: boolean

- Defined in ui/DynamicFacet/DynamicFacet.ts :191

Markup configuration example(s) :

    data-enable-scroll-to-top='true'
    data-enable-scroll-to-top='false'

### field

field: IFieldOption

- Defined in ui/DynamicFacet/DynamicFacet.ts :121

Markup configuration example(s) :

    data-field='@author'

### filterFacetCount

filterFacetCount: boolean

- Defined in ui/DynamicFacet/DynamicFacet.ts :303

Markup configuration example(s) :

    data-filter-facet-count='true'
    data-filter-facet-count='false'

### id

id: string

- Defined in ui/DynamicFacet/DynamicFacet.ts :86

Markup configuration example(s) :

    data-id='author-facet'

### includeInBreadcrumb

includeInBreadcrumb: boolean

- Defined in ui/DynamicFacet/DynamicFacet.ts :233

Markup configuration example(s) :

    data-include-in-breadcrumb='true'
    data-include-in-breadcrumb='false'

### injectionDepth

injectionDepth: number

- Defined in ui/DynamicFacet/DynamicFacet.ts :292

Markup configuration example(s) :

    data-injection-depth='10'

### numberOfValues

numberOfValues: number

- Defined in ui/DynamicFacet/DynamicFacet.ts :181

Markup configuration example(s) :

    data-number-of-values='10'

### numberOfValuesInBreadcrumb

numberOfValuesInBreadcrumb: number

- Defined in ui/DynamicFacet/DynamicFacet.ts :238

Markup configuration example(s) :

    data-number-of-values-in-breadcrumb='10'

### sortCriteria

sortCriteria: FacetSortCriteria

- Defined in ui/DynamicFacet/DynamicFacet.ts :142

Markup configuration example(s) :

    data-sort-criteria='score'

### title

title: string

- Defined in ui/DynamicFacet/DynamicFacet.ts :106

Markup configuration example(s) :

    data-title='Author'

### useLeadingWildcardInFacetSearch

useLeadingWildcardInFacetSearch: boolean

- Defined in ui/DynamicFacet/DynamicFacet.ts :217

Markup configuration example(s) :

    data-use-leading-wildcard-in-facet-search='true'
    data-use-leading-wildcard-in-facet-search='false'

### valueCaption

valueCaption: IStringMap<string>

- Defined in ui/DynamicFacet/DynamicFacet.ts :253

Markup configuration example(s) :

    data-value-caption='{ "smith_alice": "Alice Smith", "jones_bob_r": "Bob R. Jones" }'

## Constructors

### constructor

- new DynamicFacet(element: HTMLElement, options?: IDynamicFacetOptions, bindings?: IComponentBindings, classId?: string): DynamicFacet

- Overwrites Component.constructor

  - Defined in ui/DynamicFacet/DynamicFacet.ts :320

  #### Parameters

  - ##### element: HTMLElement

  - ##### Optional options: IDynamicFacetOptions

  - ##### Optional bindings: IComponentBindings

  - ##### Default value classId: string = DynamicFacet.ID

  #### Returns DynamicFacet

### Implements

- IDynamicFacet