New to Kendo UI for Vue? Start a free 30-day trial

ComboBox

Component

Represents the Kendo UI for Vue ComboBox component. Use the ComboBox to select an item from a list or to type a value in an input field.

Definition

Package:@progress/kendo-vue-dropdowns

Properties Interface:ComboBoxProps

Syntax:

vue
<ComboBox :data-items="sports" :default-value="'Basketball'" />

Properties

Sets the accessKey attribute of the ComboBox.

adaptive?

boolean

Changes the rendering of the popup based on the screen size (see example).

Sets the title of the adaptive popup (see example).

Sets whether the ComboBox accepts custom values that are not in the data (see example).

Default:

false

Sets the id values of the elements that describe the ComboBox, like the HTML aria-describedby attribute. For example, these elements can contain an error or a hint message.

Sets the aria-label attribute of the ComboBox.

Sets the id values of the elements that label the ComboBox.

Sets additional CSS classes to the ComboBox.

When you set clearButton to true, the ComboBox shows a button when you hover over it. When you click this button, the ComboBox resets its value to undefined and fires the change event.

Default:

true

Sets the key that the ComboBox uses to compare the data items. When you do not set dataItemKey, the ComboBox compares the items by reference (see example).

Sets the data of the ComboBox (more information and examples).

Sets the default value of the ComboBox. It works like the default value of the native select HTML element.

dir?

string

Sets the dir HTML attribute of the ComboBox.

disabled?

boolean

Sets the disabled state of the ComboBox.

fillMode?

"solid" | "outline" | "flat"

Configures the fillMode of the ComboBox.

The available options are:

  • solid
  • outline
  • flat
Default:

undefined

filter?

string

Sets the text of the ComboBox input. Use it when you want to control the input text.

Turns on the filtering of the ComboBox (more information and examples).

Sets a function that returns the index of the focused item.

By default, the ComboBox focuses the first item that starts with the input text.

Parameters:dataanyinputTextstringtextField?stringReturns:

number

Sets the footer component of the ComboBox popup (see example).

Sets the data item field that marks the start of a group. Applies to object data.

Sets a custom template for the group header items of the ComboBox. Use it to change the default look of the group headers.

Sets a custom template for the sticky group header of the ComboBox. Use it to change the default look of the sticky group header.

Sets the header component of the ComboBox popup (see example).

icon?

string

Sets the name of an existing font icon for the arrow button.

Sets CSS classes to the expand icon DOM element.

id?

string

Sets the id of the input element of the ComboBox. The floating label uses it as its target.

Sets the built-in HTML attributes of the inner focusable input element. You cannot change the attributes that some component features need.

Sets a custom template for the list items of the ComboBox (see example). Use it to change the default look of the list items.

label?

string

Renders a floating label for the ComboBox.

Sets a custom template for the element that the popup shows when there is no data. Use it to change the default look of this element.

loading?

boolean

Sets the loading state of the ComboBox (see example).

name?

string

Sets the name property of the input DOM element.

onBlur?

(event: ComboBoxBlurEvent) => void

Fires each time the ComboBox loses focus.

Parameters:eventComboBoxBlurEvent

Fires each time the value of the ComboBox is about to change (see examples).

Parameters:eventComboBoxChangeEvent

Fires each time the popup of the ComboBox is about to close.

Parameters:eventComboBoxCloseEvent

Fires each time the user types in the filter input (see examples). You can filter the data based on the passed filter value.

Fires each time the ComboBox receives focus.

Parameters:eventComboBoxFocusEvent

onOpen?

(event: ComboBoxOpenEvent) => void

Fires each time the popup of the ComboBox is about to open.

Parameters:eventComboBoxOpenEvent

Fires when the virtual scrolling of the ComboBox is on and the component needs data for another page (more information and examples).

Parameters:eventComboBoxPageChangeEvent

opened?

boolean

Sets whether the popup of the ComboBox is open or closed.

Sets the hint that the ComboBox shows when it is empty.

Configures the popup of the ComboBox.

Default:

{ animate: true, height: '200px', anchor: '' }

required?

boolean

Sets whether null is a valid value for the component.

rounded?

"none" | "small" | "medium" | "large" | "full"

Configures the roundness of the ComboBox.

The available options are:

  • none
  • small
  • medium
  • large
  • full
Default:

undefined

size?

"small" | "medium" | "large"

Configures the size of the ComboBox.

The available options are:

  • small
  • medium
  • large
Default:

undefined

suggest?

boolean

Turns on the auto-completion of the text based on the first data item (see example).

Default:

false

svgIcon?

SVGIcon

Sets the SVG icon for the arrow button. Use an icon from a Kendo UI for Vue theme.

tabIndex?

number

Sets the tabIndex attribute of the ComboBox.

Default:

0

Sets the data item field that holds the item text. If the data contains only primitive values, do not set it.

valid?

boolean

Overrides the validity state of the component. When you set valid, the component ignores the required property.

Sets the form error message of the component. If you set it to an empty string, the component shows no error.

Shows or hides the invalid state styles of the component. When you set it to false, the component shows no invalid state styles.

Sets the value of the ComboBox (more information and examples). The value can be a primitive (string or number) or a complex (object) type.

Sets the data item field that holds the item value.

Sets the type of the selected value. When you set it to true, the selected value must be a primitive value.

Configures the virtual scrolling of the ComboBox (more information and examples).