A multiselection component where items are displayed in a drop-down list.

MultiselectComboBox

A multi select combo box component for Vaadin Flow.

Integration of of the multiselect-combo-box web component and fully compatible with the core set of Vaadin Components

Live Demo ↗ | Material Theme Demo ↗

Install

Add the multiselect-combo-box-flow dependency to your pom.xml:

<dependency>
   <groupId>org.vaadin.gatanaso</groupId>
   <artifactId>multiselect-combo-box-flow</artifactId>
   <version>3.0.2</version> <!-- use appropriate version -->
</dependency>

Add the vaadin-addons repository:

<repository>
   <id>vaadin-addons</id>
   <url>http://maven.vaadin.com/vaadin-addons</url>
</repository>

Basic Usage

Create a MultiselectComboBox and add items

MultiselectComboBox<String> multiselectComboBox = new MultiselectComboBox();

multiselectComboBox.setLabel("Select items");

multiselectComboBox.setItems("Item 1", "Item 2", "Item 3", "Item 4");

Add a value change listener (invoked when the selected items/value is changed):

multiselectComboBox.addValueChangeListener(event -> {
    // handle value change
});

Get the selected items/value:

// set of selected values, or an emtpy set if none selected
Set<String> value = multiselectComboBox.getValue();

MultiselectComboBox also implements the MultiSelect interface, which makes it easy to listen for selection changes:

multiselectComboBox.addSelectionListener(event -> {
   event.getAddedSelection(); // get added items
   event.getRemovedSelection() // get removed items
});

For more usage examples, see the demo

Version information

  • 3.x.x - the version for Vaadin 16 and Vaadin 15
  • 2.x.x - the version for Vaadin 14 (LTS)
  • 1.x.x - the version for Vaadin 13 and Vaadin 12

Vaadin 12+ Support

To use this component in a Vaadin 12+ project, explicitly override the vaadin-combo-box dependency version by adding the following to your pom.xml file:

<dependency>
	<groupId>org.webjars.bowergithub.vaadin</groupId>
	<artifactId>vaadin-combo-box</artifactId>
	<version>4.2.7</version>
</dependency>

Optionally, to always use the latest version, a range can be specified as follows:

<version>[4.2.7, 5)</version>

Professional Support

For professional feature development and issue support reach out to: https://www.riimusolutions.com/#contact

Install

Link to this version
StableReleased 07 June 2020Apache License 2.0
Framework Support
Vaadin platform 14+
Browser Compatibility
Install with
Release notes - Version 3.0.2

This release introduces the possibility to use TemplateRenderer and ComponentRenderer #14 to customise individual items in the drop down list.

component-renderer-demo-1

For examples of how to use this feature check out the demo.

ℹ️ This release targets Vaadin 15 and Vaadin 16