MultiComboInput JAVASCRIPT UI Component API

MultiComboInput Javascript API

Class

MultiComboInput

MultiComboInput specifies an input field where the user can enter data. Auto-complete options with checkbxoes are displayed for easier input. Allows multiple selection. Selected items are added to the input field as tags.

Selector

smart-multi-combo-input

Properties

AanimationSets or retrieves the animation mode for the element. When the property is set to 'none', all animations are disabled, and any ongoing or future animations will not be executed. For any other value, the corresponding animation behavior will be applied based on the specified mode.
AautoCompleteDelaySpecifies the amount of time, in milliseconds, to wait before displaying the dropdown menu that shows matching suggestions from the autocomplete operation. This delay begins after the user stops typing, allowing for smoother user experience and reducing unnecessary searches.
HhideInputTagsCloseButtonControls the visibility of close buttons when multiple items are selected. If enabled, close buttons will be displayed for each selected item, allowing users to remove individual items. If disabled, close buttons will be hidden, preventing users from removing selected items individually.
CcolorItemsControls whether the background color of an item's tag is automatically set to match the value specified in the item's 'color' property. When enabled, if an item has a 'color' property defined, its tag background will automatically use that color. When disabled, the tag background will not be affected by the 'color' property.
DdataSourceSpecifies the source of data to be displayed in the MultiInput component. The dataSource can accept multiple formats:- An array of strings or numbers, where each entry is used as both the display value and the selection value of a list item.- An array of objects, where each object represents a list item. The object’s attributes (such as label and value) define the display text and internal value of each item.- A callback function that returns an array in either of the formats listed above.Use this property to flexibly provide static data or implement dynamic data loading for the MultiInput component.
DdisabledSpecifies whether the element is interactive or inactive. When enabled, users can interact with the element; when disabled, the element is non-interactive and typically rendered with a visually distinct, disabled appearance.
DdropDownButtonPositionSpecifies the alignment or placement of the dropdown button relative to its parent element or container, such as positioning it to the left, right, center, or at a custom location within the interface. This property controls where the dropdown button will appear within its context.
DdropDownHeightSpecifies the height of the dropdown menu. By default, this property is set to an empty string, which means the dropdown’s height is determined by a corresponding CSS variable rather than a fixed value. If a specific height value is provided, it will override the CSS variable and directly set the dropdown’s height.
DdropDownWidthSpecifies the width of the dropdown menu. By default, this property is set to an empty string, which means the dropdown's width will be determined by the corresponding CSS variable (typically a custom property defined in your stylesheet). You can override this behavior by providing a specific width value (such as "200px", "50%", etc.), which will directly set the dropdown's width instead of relying on the CSS variable.
IinputPurposeSpecifies the expected type of information for the input element—such as a user's name, email, or address—and guides the browser on how to provide relevant autofill suggestions when the element is used within a form. This property maps directly to the standard HTML autocomplete attribute. By setting values like 'on', 'off', 'name', 'email', 'organization', or 'street-address', you can instruct the browser on whether, and how, to assist the user with automated form filling. Proper use of this property enhances both the accuracy and security of autofill features, as well as improving the overall user experience.
IitemsSpecifies the maximum number of matching items to display in the dropdown menu when a new autoComplete query is performed. By default, up to 8 items will be visible in the dropdown at any one time. If more matches are found, only the first 8 will be shown, while additional results can be accessed through scrolling or pagination, depending on the implementation.
UunlockKeyGets or sets the 'unlockKey' property, which is a unique code required to activate or unlock the product's full features. Use this key to enable product access or retrieve the current key assigned to the product.
LlocaleSpecifies or retrieves the current language setting. This property works together with the messages property to display content or interface text in the selected language. When the language is set, the corresponding messages from the messages object will be used for localization.
LlocalizeFormatFunctionA callback function that allows you to define a custom formatting for messages returned by the Localization Module, enabling you to modify message content, structure, or presentation before they are displayed or processed by your application.
MmessagesSpecifies or retrieves an object containing strings used for localization within the widget. This property allows you to define custom, translatable text for various user interface elements, ensuring that the widget can display content in different languages. It is used in combination with the locale property to adapt the widget's text to the selected language or regional setting.
MminLengthSpecifies the minimum number of characters a user must enter into the input field before the autocomplete feature activates. Once this threshold is reached, the dropdown will open and display a list of items that match the entered text.
NnameSets or retrieves the value of the element's name attribute. The name attribute uniquely identifies form elements when data is submitted to the server, enabling key-value pairs to be correctly processed. This is essential in HTML forms to ensure each input's data is associated with its corresponding name.
OopenedSpecifies whether the dropdown menu is currently open (visible) or closed (hidden).
PplaceholderSpecifies the placeholder text displayed inside the input field when it is empty, providing a hint or example of the expected input value to the user.
PpillsControls whether the items in the drop-down menu are visually displayed as pill-shaped elements. When enabled, each item will have a rounded, pill-like appearance. When disabled, items will use the default style.
QqueryDefines or retrieves the search query used to filter items in the data source. This query is utilized by the autoComplete operation to determine which items are displayed based on user input. If the value is set to an empty string, all items from the data source are shown and no filtering is applied.
QqueryModeSpecifies the autocomplete query mode, which defines how user input is matched against available options during the autocomplete operation. This property selects the matching algorithm used to filter and suggest results based on the entered query, such as prefix matching, exact matching, or fuzzy searching.
RreadonlyDetermines whether the user can enter or edit text within the input field. When the dropDownButtonPosition property is set to either 'left' or 'right', the readonly property controls the component's behavior when a dataSource is provided: - If readonly is false, the element functions as a ComboBox, allowing users to type custom values as well as select from the list.- If readonly is true, the element behaves as a DropDownList, restricting the user to select only from the available options without the ability to enter custom text.
RrightToLeftConfigures or retrieves the value that determines whether the element's alignment is adjusted to support right-to-left (RTL) languages and scripts, such as Arabic or Hebrew. When enabled, the element's layout and text direction are oriented to accommodate RTL reading order for proper localization.
SseparatorSpecifies the character or string used to separate individual tags within the input field. This delimiter defines how the input is parsed into distinct tags when users enter multiple values.
SsingleSelectSpecifies if selection is restricted to a single item at a time, preventing users from selecting multiple items simultaneously.
SselectAllControls the display of an extra option at the top of the options list, which enables users to select or deselect all items with a single action. When enabled, this option appears as the first item, providing a convenient way to manage the entire selection at once.
SselectedValuesGets or sets an array containing the currently selected values. This property allows you to retrieve the list of selected items or update the selection by assigning a new array of values. Each value in the array corresponds to an item that has been selected.
SsortedSpecifies whether the items are arranged in alphabetical order. If set to true, the items will be sorted from A to Z; if false, the original order will be preserved.
SsortDirectionSpecifies the sorting algorithm to be used when sort is enabled. Accepts either asc for ascending order or desc for descending order, determining how the data will be organized.
IinputTagsModeSpecifies how selected items are displayed in the input field: either as individual tags for each selected item from the popup, or as a single tag that displays the total number of items selected.
TthemeSpecifies the visual theme to apply to the element. The selected theme controls the element’s overall appearance, including colors, fonts, and styles, ensuring consistency with the application's design scheme.
TtypeSpecifies the type of input that the field accepts, such as text, email, password, number, or date. The selected input type defines both the format of data that can be entered by the user and the behavior of the input field, including related validation and the appearance of the on-screen keyboard (on supported devices).
UunfocusableWhen set to true, this property prevents the element from receiving keyboard focus. As a result, users will not be able to navigate to the element using the Tab key or other keyboard navigation methods.
VvalueSets or retrieves the current value of the element. When used as a setter, it assigns the specified value to the element (such as updating the text in an input field or the selected option in a dropdown). When used as a getter, it returns the element’s current value.

Events

CchangeThis event is triggered whenever the user modifies the current selection, such as highlighting different text or choosing a new option within a selectable element. It enables you to respond programmatically to changes in the selected content or options.

Methods

CcloseCloses the dropdown menu by hiding its content and updating its state to indicate that it is no longer visible or active.
EensureVisibleGuarantees that the currently selected item remains within the visible area of the container, automatically scrolling as needed to bring the active item into view whenever selection changes.
OopenDisplays the dropdown menu, allowing users to view and select available options.
SselectSelects all the text within the input field. If the input field is set to readonly, the method will focus the element instead, since text selection is not allowed for readonly inputs.

Properties

animation"none" | "simple" | "advanced"

Sets or retrieves the animation mode for the element. When the property is set to 'none', all animations are disabled, and any ongoing or future animations will not be executed. For any other value, the corresponding animation behavior will be applied based on the specified mode.

Allowed Values

  • "none" - animation is disabled
  • "simple" - ripple animation is disabled
  • "advanced" - all animations are enabled

Default value

"advanced"

Example

Set the animation property.

 <smart-multi-combo-input animation='none'></smart-multi-combo-input>

Set the animation property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.animation = 'simple';

Get the animation property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let animation = multicomboinput.animation;

autoCompleteDelaynumber

Specifies the amount of time, in milliseconds, to wait before displaying the dropdown menu that shows matching suggestions from the autocomplete operation. This delay begins after the user stops typing, allowing for smoother user experience and reducing unnecessary searches.

Default value

100

Example

Set the autoCompleteDelay property.

 <smart-multi-combo-input auto-complete-delay='50'></smart-multi-combo-input>

Set the autoCompleteDelay property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.autoCompleteDelay = 200;

Get the autoCompleteDelay property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let autoCompleteDelay = multicomboinput.autoCompleteDelay;

hideInputTagsCloseButtonboolean

Controls the visibility of close buttons when multiple items are selected. If enabled, close buttons will be displayed for each selected item, allowing users to remove individual items. If disabled, close buttons will be hidden, preventing users from removing selected items individually.

Default value

false

Example

Set the hideInputTagsCloseButton property.

 <smart-multi-combo-input hide-input-tags-close-button></smart-multi-combo-input>

Set the hideInputTagsCloseButton property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.hideInputTagsCloseButton = false;

Get the hideInputTagsCloseButton property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let hideInputTagsCloseButton = multicomboinput.hideInputTagsCloseButton;

colorItemsboolean

Controls whether the background color of an item's tag is automatically set to match the value specified in the item's 'color' property. When enabled, if an item has a 'color' property defined, its tag background will automatically use that color. When disabled, the tag background will not be affected by the 'color' property.

Default value

true

Example

Set the colorItems property.

 <smart-multi-combo-input color-items></smart-multi-combo-input>

Set the colorItems property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.colorItems = false;

Get the colorItems property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let colorItems = multicomboinput.colorItems;

dataSourceany

Specifies the source of data to be displayed in the MultiInput component. The dataSource can accept multiple formats:

- An array of strings or numbers, where each entry is used as both the display value and the selection value of a list item.
- An array of objects, where each object represents a list item. The object’s attributes (such as label and value) define the display text and internal value of each item.
- A callback function that returns an array in either of the formats listed above.

Use this property to flexibly provide static data or implement dynamic data loading for the MultiInput component.

Example

Set the dataSource property.

 <smart-multi-combo-input data-source='[{ label: "item 1", value: 1 }, { label: "item 2", value: 2 }]'></smart-multi-combo-input>

Set the dataSource property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.dataSource = ["new item 1", "new item 2"];

Get the dataSource property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let dataSource = multicomboinput.dataSource;

disabledboolean

Specifies whether the element is interactive or inactive. When enabled, users can interact with the element; when disabled, the element is non-interactive and typically rendered with a visually distinct, disabled appearance.

Default value

false

Example

Set the disabled property.

 <smart-multi-combo-input disabled></smart-multi-combo-input>

Set the disabled property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.disabled = false;

Get the disabled property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let disabled = multicomboinput.disabled;

dropDownButtonPosition"none" | "left" | "right"

Specifies the alignment or placement of the dropdown button relative to its parent element or container, such as positioning it to the left, right, center, or at a custom location within the interface. This property controls where the dropdown button will appear within its context.

Allowed Values

  • "none" - The drop down button is hidden and the element acts as a simple input.
  • "left" - A drop down button is displayed on the left side of the element. The element acts as a DropDownList or a ComboBox depending on the readonly property.
  • "right" - A drop down button is displayed on the right side of the element. The element acts as a DropDownList or a ComboBox depending on the readonly property.

Default value

"right"

Example

Set the dropDownButtonPosition property.

 <smart-multi-combo-input drop-down-button-position='top'></smart-multi-combo-input>

Set the dropDownButtonPosition property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.dropDownButtonPosition = 'bottom';

Get the dropDownButtonPosition property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let dropDownButtonPosition = multicomboinput.dropDownButtonPosition;

dropDownHeightstring | number

Specifies the height of the dropdown menu. By default, this property is set to an empty string, which means the dropdown’s height is determined by a corresponding CSS variable rather than a fixed value. If a specific height value is provided, it will override the CSS variable and directly set the dropdown’s height.

Default value

""

Example

Set the dropDownHeight property.

 <smart-multi-combo-input drop-down-height='300'></smart-multi-combo-input>

Set the dropDownHeight property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.dropDownHeight = 500;

Get the dropDownHeight property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let dropDownHeight = multicomboinput.dropDownHeight;

dropDownWidthstring | number

Specifies the width of the dropdown menu. By default, this property is set to an empty string, which means the dropdown's width will be determined by the corresponding CSS variable (typically a custom property defined in your stylesheet). You can override this behavior by providing a specific width value (such as "200px", "50%", etc.), which will directly set the dropdown's width instead of relying on the CSS variable.

Default value

""

Example

Set the dropDownWidth property.

 <smart-multi-combo-input drop-down-width='300'></smart-multi-combo-input>

Set the dropDownWidth property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.dropDownWidth = 500;

Get the dropDownWidth property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let dropDownWidth = multicomboinput.dropDownWidth;

inputPurposestring

Specifies the expected type of information for the input element—such as a user's name, email, or address—and guides the browser on how to provide relevant autofill suggestions when the element is used within a form. This property maps directly to the standard HTML autocomplete attribute. By setting values like 'on', 'off', 'name', 'email', 'organization', or 'street-address', you can instruct the browser on whether, and how, to assist the user with automated form filling. Proper use of this property enhances both the accuracy and security of autofill features, as well as improving the overall user experience.

Default value

"off"

Example

Set the inputPurpose property.

 <smart-multi-combo-input input-purpose='on'></smart-multi-combo-input>

Set the inputPurpose property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.inputPurpose = 'country';

Get the inputPurpose property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let inputPurpose = multicomboinput.inputPurpose;

itemsnumber

Specifies the maximum number of matching items to display in the dropdown menu when a new autoComplete query is performed. By default, up to 8 items will be visible in the dropdown at any one time. If more matches are found, only the first 8 will be shown, while additional results can be accessed through scrolling or pagination, depending on the implementation.

Default value

8

Example

Set the items property.

 <smart-multi-combo-input items='2'></smart-multi-combo-input>

Set the items property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.items = 5;

Get the items property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let items = multicomboinput.items;

unlockKeystring

Gets or sets the 'unlockKey' property, which is a unique code required to activate or unlock the product's full features. Use this key to enable product access or retrieve the current key assigned to the product.

Default value

""

Example

Set the unlockKey property.

 <smart-multi-combo-input unlock-key=''></smart-multi-combo-input>

Set the unlockKey property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.unlockKey = '1111-2222-3333-4444-5555';

Get the unlockKey property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let unlockKey = multicomboinput.unlockKey;

localestring

Specifies or retrieves the current language setting. This property works together with the messages property to display content or interface text in the selected language. When the language is set, the corresponding messages from the messages object will be used for localization.

Default value

"en"

Example

Set the locale property.

 <smart-multi-combo-input locale='de'></smart-multi-combo-input>

Set the locale property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.locale = 'en';

Get the locale property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let locale = multicomboinput.locale;

localizeFormatFunctionfunction

A callback function that allows you to define a custom formatting for messages returned by the Localization Module, enabling you to modify message content, structure, or presentation before they are displayed or processed by your application.

Example

Set the localizeFormatFunction property.

 <smart-multi-combo-input localize-format-function='function(defaultMessage, message, messageArguments){return '...'}'></smart-multi-combo-input>

Set the localizeFormatFunction property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.localizeFormatFunction = function(defaultMessage, message, messageArguments){return '...'};

Get the localizeFormatFunction property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let localizeFormatFunction = multicomboinput.localizeFormatFunction;

messagesobject

Specifies or retrieves an object containing strings used for localization within the widget. This property allows you to define custom, translatable text for various user interface elements, ensuring that the widget can display content in different languages. It is used in combination with the locale property to adapt the widget's text to the selected language or regional setting.

Default value




"en": {

"propertyUnknownType": "'{{name}}' property is with undefined 'type' member!",

"propertyInvalidValue": "Invalid '{{name}}' property value! Actual value: {{actualValue}}, Expected value: {{value}}!",

"propertyInvalidValueType": "Invalid '{{name}}' property value type! Actual type: {{actualType}}, Expected type: {{type}}!",

"elementNotInDOM": "Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.",

"moduleUndefined": "Module is undefined.",

"missingReference": "{{elementType}}: Missing reference to {{files}}.",

"htmlTemplateNotSuported": "{{elementType}}: Browser doesn't support HTMLTemplate elements.",

"invalidTemplate": "{{elementType}}: '{{property}}' property accepts a string that must match the id of an HTMLTemplate element from the DOM.",

"invalidNode": "{{elementType}}: Invalid parameter '{{node}}' when calling {{method}}."

}

Example

Set the messages property.

 <smart-multi-combo-input messages='{"de":{"propertyUnknownType":"Die Eigenschaft '{{name}}' hat ein nicht definiertes 'type'-Member!","propertyInvalidValue":"Ungultiger Eigenschaftswert '{{name}}'! Aktueller Wert: {{actualValue}}, Erwarteter Wert: {{value}}!","propertyInvalidValueType":"Ungultiger Eigenschaftswert '{{name}}'! Aktueller Wert: {{actualType}}, Erwarteter Wert: {{type}}!","elementNotInDOM":"Element existiert nicht in DOM! Bitte fugen Sie das Element zum DOM hinzu, bevor Sie eine Methode aufrufen.","moduleUndefined":"Modul ist nicht definiert.","missingReference":"{{elementType}}: Fehlender Verweis auf {{files}}.","htmlTemplateNotSuported":"{{elementType}}: Browser unterstutzt keine HTMLTemplate-Elemente.","invalidTemplate":"{{elementType}}: '{{property}}' Die Eigenschaft akzeptiert eine Zeichenfolge, die mit der ID eines HTMLTemplate-Elements aus dem DOM ubereinstimmen muss.","invalidNode":"{{elementType}}: Ungultiger Parameter '{{node}}' beim Aufruf von {{method}}."}}'></smart-multi-combo-input>

Set the messages property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.messages = {"en":{"propertyUnknownType":"'{{name}}' property is with undefined 'type' member!","propertyInvalidValue":"Invalid '{{name}}' property value! Actual value: {{actualValue}}, Expected value: {{value}}!","propertyInvalidValueType":"Invalid '{{name}}' property value type! Actual type: {{actualType}}, Expected type: {{type}}!","elementNotInDOM":"Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.","moduleUndefined":"Module is undefined.","missingReference":"{{elementType}}: Missing reference to {{files}}.","htmlTemplateNotSuported":"{{elementType}}: Browser doesn't support HTMLTemplate elements.","invalidTemplate":"{{elementType}}: '{{property}}' property accepts a string that must match the id of an HTMLTemplate element from the DOM.","invalidNode":"{{elementType}}: Invalid parameter '{{node}}' when calling {{method}}."}};

Get the messages property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let messages = multicomboinput.messages;

minLengthnumber

Specifies the minimum number of characters a user must enter into the input field before the autocomplete feature activates. Once this threshold is reached, the dropdown will open and display a list of items that match the entered text.

Default value

1

Example

Set the minLength property.

 <smart-multi-combo-input min-length='2'></smart-multi-combo-input>

Set the minLength property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.minLength = 0;

Get the minLength property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let minLength = multicomboinput.minLength;

namestring

Sets or retrieves the value of the element's name attribute. The name attribute uniquely identifies form elements when data is submitted to the server, enabling key-value pairs to be correctly processed. This is essential in HTML forms to ensure each input's data is associated with its corresponding name.

Default value

""

Example

Set the name property.

 <smart-multi-combo-input name='dropdown'></smart-multi-combo-input>

Set the name property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.name = 'dropDown2';

Get the name property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let name = multicomboinput.name;

openedboolean

Specifies whether the dropdown menu is currently open (visible) or closed (hidden).

Default value

false

Example

Set the opened property.

 <smart-multi-combo-input opened></smart-multi-combo-input>

Set the opened property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.opened = false;

Get the opened property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let opened = multicomboinput.opened;

placeholderstring

Specifies the placeholder text displayed inside the input field when it is empty, providing a hint or example of the expected input value to the user.

Default value

""

Example

Set the placeholder property.

 <smart-multi-combo-input placeholder='Empty'></smart-multi-combo-input>

Set the placeholder property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.placeholder = 'Enter:';

Get the placeholder property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let placeholder = multicomboinput.placeholder;

pillsboolean

Controls whether the items in the drop-down menu are visually displayed as pill-shaped elements. When enabled, each item will have a rounded, pill-like appearance. When disabled, items will use the default style.

Default value

false

Example

Set the pills property.

 <smart-multi-combo-input pills></smart-multi-combo-input>

Set the pills property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.pills = false;

Get the pills property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let pills = multicomboinput.pills;

querystring | number

Defines or retrieves the search query used to filter items in the data source. This query is utilized by the autoComplete operation to determine which items are displayed based on user input. If the value is set to an empty string, all items from the data source are shown and no filtering is applied.

Default value

""

Example

Set the query property.

 <smart-multi-combo-input query='ABC'></smart-multi-combo-input>

Set the query property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.query = 'some query';

Get the query property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let query = multicomboinput.query;

queryMode"contains" | "containsIgnoreCase" | "doesNotContain" | "doesNotContainIgnoreCase" | "equals" | "equalsIgnoreCase" | "startsWith" | "startsWithIgnoreCase" | "endsWith" | "endsWithIgnoreCase"

Specifies the autocomplete query mode, which defines how user input is matched against available options during the autocomplete operation. This property selects the matching algorithm used to filter and suggest results based on the entered query, such as prefix matching, exact matching, or fuzzy searching.

Allowed Values

  • "contains" - Displays the items that contain the search query (case sensitive)
  • "containsIgnoreCase" - Displays the items that contain the search query (case insensitive)
  • "doesNotContain" - Displays the items that do not contain the search query (case sensitive)
  • "doesNotContainIgnoreCase" - Displays the items that do not contain the search query (case insensitive)
  • "equals" - Displays the items that are equal the search query (case sensitive)
  • "equalsIgnoreCase" - Displays the items that are equal the search query (case insensitive)
  • "startsWith" - Displays the items that start with the search query (case sensitive)
  • "startsWithIgnoreCase" - Displays the items that start with the search query (case insensitive)
  • "endsWith" - Displays the items that end with the search query (case sensitive)
  • "endsWithIgnoreCase" - Displays the items that start with the search query (case insensitive)

Default value

"containsIgnoreCase"

Example

Set the queryMode property.

 <smart-multi-combo-input query-mode='contains'></smart-multi-combo-input>

Set the queryMode property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.queryMode = 'endsWith';

Get the queryMode property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let queryMode = multicomboinput.queryMode;

readonlyboolean

Determines whether the user can enter or edit text within the input field. When the dropDownButtonPosition property is set to either 'left' or 'right', the readonly property controls the component's behavior when a dataSource is provided:
- If readonly is false, the element functions as a ComboBox, allowing users to type custom values as well as select from the list.
- If readonly is true, the element behaves as a DropDownList, restricting the user to select only from the available options without the ability to enter custom text.

Default value

false

Example

Set the readonly property.

 <smart-multi-combo-input readonly></smart-multi-combo-input>

Set the readonly property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.readonly = false;

Get the readonly property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let readonly = multicomboinput.readonly;

rightToLeftboolean

Configures or retrieves the value that determines whether the element's alignment is adjusted to support right-to-left (RTL) languages and scripts, such as Arabic or Hebrew. When enabled, the element's layout and text direction are oriented to accommodate RTL reading order for proper localization.

Default value

false

Example

Set the rightToLeft property.

 <smart-multi-combo-input right-to-left></smart-multi-combo-input>

Set the rightToLeft property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.rightToLeft = true;

Get the rightToLeft property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let rightToLeft = multicomboinput.rightToLeft;

separatorstring

Specifies the character or string used to separate individual tags within the input field. This delimiter defines how the input is parsed into distinct tags when users enter multiple values.

Default value

""

Example

Set the separator property.

 <smart-multi-combo-input separator='-'></smart-multi-combo-input>

Set the separator property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.separator = ',';

Get the separator property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let separator = multicomboinput.separator;

singleSelectboolean

Specifies if selection is restricted to a single item at a time, preventing users from selecting multiple items simultaneously.

Default value

false

Example

Set the singleSelect property.

 <smart-multi-combo-input single-select></smart-multi-combo-input>

Set the singleSelect property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.singleSelect = false;

Get the singleSelect property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let singleSelect = multicomboinput.singleSelect;

selectAllboolean

Controls the display of an extra option at the top of the options list, which enables users to select or deselect all items with a single action. When enabled, this option appears as the first item, providing a convenient way to manage the entire selection at once.

Default value

false

Example

Set the selectAll property.

 <smart-multi-combo-input select-all></smart-multi-combo-input>

Set the selectAll property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.selectAll = false;

Get the selectAll property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let selectAll = multicomboinput.selectAll;

selectedValuesarray

Gets or sets an array containing the currently selected values.
This property allows you to retrieve the list of selected items or update the selection by assigning a new array of values. Each value in the array corresponds to an item that has been selected.

sortedboolean

Specifies whether the items are arranged in alphabetical order. If set to true, the items will be sorted from A to Z; if false, the original order will be preserved.

Default value

false

Example

Set the sorted property.

 <smart-multi-combo-input sorted></smart-multi-combo-input>

Set the sorted property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.sorted = false;

Get the sorted property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let sorted = multicomboinput.sorted;

sortDirectionstring

Specifies the sorting algorithm to be used when sort is enabled. Accepts either asc for ascending order or desc for descending order, determining how the data will be organized.

Default value

"asc"

Example

Set the sortDirection property.

 <smart-multi-combo-input sort-direction='desc'></smart-multi-combo-input>

Set the sortDirection property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.sortDirection = 'asc';

Get the sortDirection property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let sortDirection = multicomboinput.sortDirection;

inputTagsMode"one" | "many"

Specifies how selected items are displayed in the input field: either as individual tags for each selected item from the popup, or as a single tag that displays the total number of items selected.

Allowed Values

  • "one" - The input field will contain a single tag that shows the number of selected items.
  • "many" - The input field will contain tags for each selected item from the popup.

Default value

"many"

Example

Set the inputTagsMode property.

 <smart-multi-combo-input input-tags-mode='one'></smart-multi-combo-input>

Set the inputTagsMode property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.inputTagsMode = 'many';

Get the inputTagsMode property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let inputTagsMode = multicomboinput.inputTagsMode;

themestring

Specifies the visual theme to apply to the element. The selected theme controls the element’s overall appearance, including colors, fonts, and styles, ensuring consistency with the application's design scheme.

Default value

""

Example

Set the theme property.

 <smart-multi-combo-input theme='blue'></smart-multi-combo-input>

Set the theme property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.theme = 'red';

Get the theme property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let theme = multicomboinput.theme;

typestring

Specifies the type of input that the field accepts, such as text, email, password, number, or date. The selected input type defines both the format of data that can be entered by the user and the behavior of the input field, including related validation and the appearance of the on-screen keyboard (on supported devices).

Default value

""

Example

Set the type property.

 <smart-multi-combo-input type='number'></smart-multi-combo-input>

Set the type property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.type = 'text';

Get the type property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let type = multicomboinput.type;

unfocusableboolean

When set to true, this property prevents the element from receiving keyboard focus. As a result, users will not be able to navigate to the element using the Tab key or other keyboard navigation methods.

Default value

false

Example

Set the unfocusable property.

 <smart-multi-combo-input unfocusable></smart-multi-combo-input>

Set the unfocusable property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.unfocusable = false;

Get the unfocusable property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let unfocusable = multicomboinput.unfocusable;

valuestring

Sets or retrieves the current value of the element. When used as a setter, it assigns the specified value to the element (such as updating the text in an input field or the selected option in a dropdown). When used as a getter, it returns the element’s current value.

Default value

""

Example

Set the value property.

 <smart-multi-combo-input value='value1'></smart-multi-combo-input>

Set the value property by using the HTML Element's instance.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 multicomboinput.value = 'value2';

Get the value property.

 const multicomboinput = document.querySelector('smart-multi-combo-input');
 let value = multicomboinput.value;

Events

changeCustomEvent

This event is triggered whenever the user modifies the current selection, such as highlighting different text or choosing a new option within a selectable element. It enables you to respond programmatically to changes in the selected content or options.

  • Bubbles Yes
  • Cancelable No
  • Interface CustomEvent
  • Event handler property onChange

Arguments

evCustomEvent
ev.detailObject
ev.detail.label - The label of the new selected item.
ev.detail.oldLabel - The label of the item that was previously selected before the event was triggered.
ev.detail.oldValue - The value of the item that was previously selected before the event was triggered.
ev.detail.value - The value of the new selected item.

Methods

isDefaultPrevented

Returns true if the event was prevented by any of its subscribers.

Returns

boolean true if the default action was prevented. Otherwise, returns false.

preventDefault

The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.

stopPropagation

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

Example

Set up the event handler of change event.

const multicomboinput = document.querySelector('smart-multi-combo-input');
multicomboinput.addEventListener('change', function (event) {
    const detail = event.detail,
        label = detail.label,
        oldLabel = detail.oldLabel,
        oldValue = detail.oldValue,
        value = detail.value;

	// event handling code goes here.
})

Methods

close(): void

Closes the dropdown menu by hiding its content and updating its state to indicate that it is no longer visible or active.


Invoke the close method.

const multicomboinput = document.querySelector('smart-multi-combo-input');
multicomboinput.close();

Try a demo showcasing the close method.

ensureVisible(): void

Guarantees that the currently selected item remains within the visible area of the container, automatically scrolling as needed to bring the active item into view whenever selection changes.


Invoke the ensureVisible method.

const multicomboinput = document.querySelector('smart-multi-combo-input');
multicomboinput.ensureVisible();

open(): void

Displays the dropdown menu, allowing users to view and select available options.


Invoke the open method.

const multicomboinput = document.querySelector('smart-multi-combo-input');
multicomboinput.open();

Try a demo showcasing the open method.

select(): void

Selects all the text within the input field. If the input field is set to readonly, the method will focus the element instead, since text selection is not allowed for readonly inputs.


Invoke the select method.

const multicomboinput = document.querySelector('smart-multi-combo-input');
multicomboinput.select();