/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { FilterChangeEvent, ChangeEvent, OpenEvent, CloseEvent, FocusEvent, BlurEvent, PageChangeEvent } from './../common/events'; import { FormComponentProps } from '@progress/kendo-vue-common'; import { VirtualizationSettings, DropDownsPopupSettings } from '../common/settings'; import { SVGIcon } from '@progress/kendo-svg-icons'; /** * Represents the object of the `FilterChange` ComboBox event. */ export interface ComboBoxFilterChangeEvent extends FilterChangeEvent { } /** * Represents the object of the `change` ComboBox event. */ export interface ComboBoxChangeEvent extends ChangeEvent { } /** * Represents the object of the `open` ComboBox event. */ export interface ComboBoxOpenEvent extends OpenEvent { } /** * Represents the object of the `close` ComboBox event. */ export interface ComboBoxCloseEvent extends CloseEvent { } /** * Represents the object of the `focus` ComboBox event. */ export interface ComboBoxFocusEvent extends FocusEvent { } /** * Represents the object of the `blur` ComboBox event. */ export interface ComboBoxBlurEvent extends BlurEvent { } /** * Represents the object of the `PageChange` ComboBox event. */ export interface ComboBoxPageChangeEvent extends PageChangeEvent { } /** * Represents the props of the [Kendo UI for Vue ComboBox component]({% slug overview_combobox %}). */ export interface ComboBoxProps extends FormComponentProps { /** * Sets the dataItems of the ComboBox ([more information and examples]({% slug binding_combobox %})). */ dataItems?: any[]; /** * Sets the opened and closed state of the ComboBox. */ opened?: boolean; /** * Sets the value of the ComboBox ([more information and examples]({% slug binding_combobox %})). It can either be of the primitive (string, numbers) or of the complex (objects) type. */ value?: any; /** * Sets the default value of the ComboBox. Similar to the native `select` HTML element. */ defaultValue?: any; /** * Defines the name for an existing arrow icon. */ icon?: string; /** * Defines the svg icon in a Kendo UI for Vue theme. */ svgIcon?: SVGIcon; /** * Sets CSS classes to the expand `icon` DOM element. */ iconClassName?: string; /** * If `clearButton` is set to `true`, the ComboBox renders a button on hovering over the component. Clicking this button resets the value of the ComboBox to `undefined` and triggers the `change` event. */ clearButton?: boolean; /** * The hint that is displayed when the ComboBox is empty. */ placeholder?: string; /** * Enables the auto-completion of the text based on the first data item ([see example]({% slug suggestions_combobox %})). */ suggest?: boolean; /** * Specifies whether the ComboBox allows user-defined values that are not present in the dataset ([see example]({% slug custom_values_combobox %})). Defaults to `false`. */ allowCustom?: boolean; /** * Sets the disabled state of the ComboBox. */ disabled?: boolean; /** * Sets additional classes to the DropDownList. */ className?: string; /** * @hidden */ modelValue?: any; /** * Represents the `dir` HTML attribute. */ dir?: string; /** * Enables the filtering functionality of the ComboBox ([more information and examples]({% slug filtering_combobox %})). */ filterable?: boolean; /** * Sets the value of ComboBox input. Useful for making the ComboBox input a controlled component. */ filter?: string | null; /** * Sets the loading state of the ComboBox ([see example]({% slug filtering_combobox %}#toc-basic-configuration)). */ loading?: boolean; /** * Specifies the `tabIndex` of the ComboBox. */ tabIndex?: number; /** * Specifies the `accessKey` of the ComboBox. */ accessKey?: string; /** * Sets the data item field that represents the item text. If the data contains only primitive values, do not define it. */ textField?: string; /** * Sets the data item field that represents the item value. */ valueField?: string; /** * Specifies the type of the selected value. If set to true, the selected value has to be of a primitive value. */ valuePrimitive?: boolean; /** * Sets the key for comparing the data items of the ComboBox. If `dataItemKey` is not set, the ComboBox compares the items by reference ([see example]({% slug binding_combobox %}#toc-datasets-of-objects)). */ dataItemKey?: string; /** * Renders a floating label for the ComboBox. */ label?: string; /** * Configures the popup of the ComboBox. */ popupSettings?: DropDownsPopupSettings; /** * Configures the virtual scrolling of the ComboBox ([more information and examples]({% slug virtualization_combobox %})). */ virtual?: VirtualizationSettings; /** * Specifies the id of the component. */ id?: string; /** * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute). * For example these elements could contain error or hint message. */ ariaDescribedBy?: string; /** * Identifies the element(s) which will label the component. */ ariaLabelledBy?: string; /** * Defines the [aria-label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) attribute of the component. */ ariaLabel?: string; /** * If set, the ComboBox will use it to get the focused item index. * * Default functionality returns the first item which starts with the input text. */ focusedItemIndex?: (data: any, inputText: string, textField?: string) => number; /** * Fires each time the popup of the ComboBox is about to open. */ onOpen?: (event: ComboBoxOpenEvent) => void; /** * Fires each time the popup of the ComboBox is about to close. */ onClose?: (event: ComboBoxCloseEvent) => void; /** * Fires each time the user focuses the ComboBox. */ onFocus?: (event: ComboBoxFocusEvent) => void; /** * Fires each time the ComboBox gets blurred. */ onBlur?: (event: ComboBoxBlurEvent) => void; /** * Fires each time the value of the ComboBox is about to change ([see examples]({% slug binding_combobox %})). */ onChange?: (event: ComboBoxChangeEvent) => void; /** * Fires each time the user types in the filter input ([see examples]({% slug filtering_combobox %}#toc-basic-configuration)). You can filter the source based on the passed filtration value. */ onFilterchange?: (event: ComboBoxFilterChangeEvent) => void; /** * Fires when both the virtual scrolling of the ComboBox is enabled and the component requires data for another page ([more information and examples]({% slug virtualization_combobox %})). */ onPagechange?: (event: ComboBoxPageChangeEvent) => void; /** * Fires when a ComboBox list item is about to be rendered ([see example]({% slug customrendering_combobox %}#toc-items)). Used to override the default appearance of the list items. */ itemRender?: any; /** * Fires when the element which indicates no data in the popup is about to be rendered. Used to override the default appearance of the element. */ listNoDataRender?: any; /** * Sets the header component of the ComboBox ([see example]({% slug customrendering_combobox %}#toc-headers-and-footers)). */ header?: any; /** * Sets the footer component of the ComboBox ([see example]({% slug customrendering_combobox %}#toc-headers-and-footers)). */ footer?: any; /** * Configures the `size` of the ComboBox. * * The available options are: * - small * - medium * - large * * @default undefined */ size?: 'small' | 'medium' | 'large'; /** * Configures the `roundness` of the ComboBox. * * The available options are: * - none * - small * - medium * - large * - full * * @default undefined */ rounded?: 'none' | 'small' | 'medium' | 'large' | 'full'; /** * Configures the `fillMode` of the ComboBox. * * The available options are: * - solid * - outline * - flat * * @default undefined */ fillMode?: 'solid' | 'outline' | 'flat'; /** * Sets the data item field that represents the start of a group. Applicable to objects data. */ groupField?: string; /** * Fires when a ComboBox group header item is about to be rendered. Used to override the default appearance of the group's headers. */ groupHeaderItemRender?: any; /** * Fires when a ComboBox sticky group header item is about to be rendered. Used to override the default appearance of the sticky group header of the component. */ groupStickyHeaderItemRender?: any; /** * Provides different rendering of the popup element based on the screen dimensions ([see example]({% slug adaptive_rendering_combobox %})). */ adaptive?: boolean; /** * Specifies the text that is rendered as title in the adaptive popup ([see example]({% slug adaptive_rendering_combobox %})). */ adaptiveTitle?: string; /** * Sets the built-in HTML attributes of the inner focusable input element. * Attributes which are essential for certain component functionalities cannot be changed. */ inputAttributes?: Object; }