vaadin-combo-box Basic Usage

Configuration

The data items displayed by vaadin-combo-box can be set and accessed using the items property. The items may be assigned with data-binding, using an attribute or the JavaScript property directly. An array of String or Object values is currently supported. Use the label attribute to provide a label for the element.

Typing some text into the vaadin-combo-box's input field will filter the values defined in the items property and show only items that contain the value in the input field. If the typed value doesn't match any of shown items, closing the vaadin-combo-box will select the typed value.

HTMLImports.whenReady(function() { // code var combobox = combobox || document.querySelector('vaadin-combo-box'); // The elements is an array of String values. combobox.items = elements; // end-code });