# Coveo Querybox Component (CoveoQuerybox)

## Index

### Methods

- clear
- debugInfo
- disable
- enable
- getBindings
- getCursor
- getDisplayedResult
- getResult
- getText
- resultAtCursor
- setText
- submit
- get

### Properties

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

### Accessors

- usageAnalytics

### Component Options

- enableLowercaseOperators
- enablePartialMatch
- enableQuerySyntax
- enableQuestionMarks
- enableSearchAsYouType
- enableWildcards
- partialMatchKeywords
- partialMatchThreshold
- searchAsYouTypeDelay
- triggerQueryOnClear

### Constructors

- constructor

## Methods

### clear

- clear(): void

- - Defined in ui/Querybox/Querybox.ts :306

  #### Returns void

### debugInfo

- debugInfo(): any

- Inherited from BaseComponent.debugInfo

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

  #### Returns any

### 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

### getBindings

- getBindings(): IComponentBindings

- Inherited from Component.getBindings

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

  #### Returns IComponentBindings

### getCursor

- getCursor(): number

- - Defined in ui/Querybox/Querybox.ts :342

  #### Returns number

  The cursor position (index starts at 0).

### getDisplayedResult

- getDisplayedResult(): Result

- - Defined in ui/Querybox/Querybox.ts :333

  #### Returns Result

  The displayed result.

### getResult

- getResult(): Result

- - Defined in ui/Querybox/Querybox.ts :324

  #### Returns Result

  The result.

### getText

- getText(): string

- - Defined in ui/Querybox/Querybox.ts :315

  #### Returns string

  The content of the input.

### resultAtCursor

- resultAtCursor(match?: string | function): Result[]

- - Defined in ui/Querybox/Querybox.ts :353

  #### Parameters

  - ##### Optional match: string | function

  #### Returns Result[]

  The result.

### setText

- setText(text: string): void

- - Defined in ui/Querybox/Querybox.ts :296

  #### Parameters

  - ##### text: string

  #### Returns void

### submit

- submit(): void

- - Defined in ui/Querybox/Querybox.ts :284

  #### 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

### enableLowercaseOperators

enableLowercaseOperators: boolean

- Defined in ui/Querybox/Querybox.ts :153

Markup configuration example(s) :

    data-enable-lowercase-operators='true'
    data-enable-lowercase-operators='false'

### enablePartialMatch

enablePartialMatch: boolean

- Defined in ui/Querybox/Querybox.ts :167

Markup configuration example(s) :

    data-enable-partial-match='true'
    data-enable-partial-match='false'

### enableQuerySyntax

enableQuerySyntax: boolean

- Defined in ui/Querybox/Querybox.ts :103

Markup configuration example(s) :

    data-enable-query-syntax='true'
    data-enable-query-syntax='false'

### enableQuestionMarks

enableQuestionMarks: boolean

- Defined in ui/Querybox/Querybox.ts :134

Markup configuration example(s) :

    data-enable-question-marks='true'
    data-enable-question-marks='false'

### enableSearchAsYouType

enableSearchAsYouType: boolean

- Defined in ui/Querybox/Querybox.ts :69

Markup configuration example(s) :

    data-enable-search-as-you-type='true'
    data-enable-search-as-you-type='false'

### enableWildcards

enableWildcards: boolean

- Defined in ui/Querybox/Querybox.ts :119

Markup configuration example(s) :

    data-enable-wildcards='true'
    data-enable-wildcards='false'

### partialMatchKeywords

partialMatchKeywords: number

- Defined in ui/Querybox/Querybox.ts :182

Markup configuration example(s) :

    data-partial-match-keywords='10'

### partialMatchThreshold

partialMatchThreshold: string

- Defined in ui/Querybox/Querybox.ts :195

Markup configuration example(s) :

    data-partial-match-threshold='foo'

### searchAsYouTypeDelay

searchAsYouTypeDelay: number

- Defined in ui/Querybox/Querybox.ts :77

Markup configuration example(s) :

    data-search-as-you-type-delay='10'

### triggerQueryOnClear

triggerQueryOnClear: boolean

- Defined in ui/Querybox/Querybox.ts :202

Markup configuration example(s) :

    data-trigger-query-on-clear='true'
    data-trigger-query-on-clear='false'

## Constructors

### constructor

- new Querybox(element: HTMLElement, options?: IQueryboxOptions, bindings?: IComponentBindings): Querybox

- Overwrites Component.constructor

  - Defined in ui/Querybox/Querybox.ts :208

  #### Parameters

  - ##### element: HTMLElement

  - ##### Optional options: IQueryboxOptions

  - ##### Optional bindings: IComponentBindings

  #### Returns Querybox