Skip to content

Combobox

Properties

PropertyTypeDefaultDescription
labelstring''Label text for the input field.
placeholderstring''Text displayed when no value is entered in the input field.
itemsArray<object>Array of items to be displayed. The display text is determined using the labelField property.
suggestCountnumber6Number of items to be displayed in the suggestion list.
labelFieldstring|FunctionnullDefines the field that determines the value of items to be displayed.
closeOnSelectbooleantrueDefines whether to automatically close the suggestion list upon item selection.
closeOnFocusOutbooleantrueDefines whether to automatically close the suggestion list on focus out.
closeOnOutsideDownbooleantrueDefines whether to automatically close the suggestion list on outside click.
inputValuestring''Current value entered in the input field.
minCharnumber0Minimum number of characters required to activate the suggestion list.
clearablebooleanfalseWhether to enable the reset button when the input field has a value.
delimiterOnKeysArray<number>[9, 13]Array of key codes that trigger value input when pressed by the user.
coordinateMode'global'|'relative'|'none'relativeSets the coordinate system for the popup.
filterablebooleanfalseWhether items in the combobox can be filtered based on the user's input string.
chipRemovablebooleanfalseWhether to enable the delete button for displayed items.
filter(item: any, keyword: string) => booleanDefines a comparison function for filtering items. When the filtering property is true, only filtered items are displayed in the list based on this function's return value.
allowMultiplebooleanfalseWhether users can select multiple items.
requireSelectionbooleanfalseWhether at least one item must always be selected.
valueFieldstringName of the field that determines the value of the selected item.
selectedItemobjectDefines the selected item.
selectedItemsArray<object>Defines multiple selected items.
selectedValueArray<string>Defines the valueField property values of the selected items.

Methods

MethodParametersReturn ValueDescription
focusvoidSets focus to the input field.
blurvoidRemoves focus from the input field.
openSuggestvalue?: stringbooleanOpens the suggestion list. Retrieves and displays the suggestion list using the value parameter and suggestSource property.
closeSuggestvoidCloses the suggestion list.
clearvoidResets the entered value, displayed suggestion list, and selected item.

Events

EventTypeDescription
suggest-caret-change(event: CustomEvent<{value: number; oldValue: number}>) => voidOccurs when the cursor index changes in the suggestion list.
suggest-opening(event: SuggestEvent<T>) => voidOccurs before the suggestion list opens.
suggest-open(event: SuggestEvent<T>) => voidOccurs when the suggestion list opens.
suggest-closing(event: SuggestEvent<T>) => voidOccurs before the suggestion list closes.
suggest-close(event: SuggestEvent<T>) => voidOccurs when the suggestion list closes.
suggest-item-down(event: SuggestEvent<T>) => voidOccurs when mouse down on a suggestion list item. Occurs when selectOnClick is false.
suggest-item-click(event: SuggestEvent<T>) => voidOccurs when mouse click on a suggestion list item. Occurs when selectOnClick is true.
suggest-select(event: SuggestEvent<T>) => voidOccurs when a specific item is selected from the suggestion list.
value-change(event: CustomEvent<{value: string; oldValue: string}>) => voidOccurs when the value property changes.
input(event: CustomEvent<{value: string; trigger: InputEvent}>) => voidOccurs when the input element's value changes.
keydown(event: CustomEvent<{value: string; trigger: KeyboardEvent}>) => voidOccurs when a key is pressed on the input element.
keyup(event: CustomEvent<{value: string; trigger: KeyboardEvent}>) => voidOccurs when a key is released on the input element.
focusin(event: CustomEvent<{trigger: Event}>) => voidOccurs when focus is received.
focusout(event: CustomEvent<{trigger: Event}>) => voidOccurs when focus is lost.
suggest-add(event: SuggestEvent<T>) => voidOccurs when a token item is added.
suggest-remove(event: SuggestEvent<T>) => voidOccurs when a token item is removed.
suggest-duplicate(event: SuggestEvent<T>) => voidOccurs when there is a duplicate item when adding a token item.