Directory

← Back

Multiple Select

An extended version of Vaadin Select supporting multiple-items selection.

Author

Rating

Popularity

<100

This component is an extended version of Vaadin Select supporting multiple-items selection. It is the Vaadin 14 Java integration of @vaadin-component-factory/vcf-multi-select.

Install

To use the component in an application using maven, add the following dependency to your pom.xml:

<dependency>
    <groupId>com.vaadin.componentfactory</groupId>
    <artifactId>multiple-select</artifactId>
    <version>${component.version}</version>
</dependency>

Usage

The component is intended to be used in the same way as Vaadin Select. For example,

MultipleSelect<String> labelSelect = new MultipleSelect<>();
labelSelect.setItems("Option one", "Option two");
labelSelect.setLabel("Label");

MultipleSelect<String> placeholderSelect = new MultipleSelect<>();
placeholderSelect.setItems("Option one", "Option two");
placeholderSelect.setPlaceholder("Placeholder");

MultipleSelect<String> valueSelect = new MultipleSelect<>();
valueSelect.setItems("Value", "Option one", "Option two");
valueSelect.setValue("Value");

add(labelSelect, placeholderSelect, valueSelect);

Limitations

The component is not working with Vaadin 14 in compatiblity mode.

Sample code


MultipleSelect<String> multipleSelect = new MultipleSelect<>();
multipleSelect.setItems("Jose", "Manolo", "Pedro");

multipleSelect.addSelectionListener(e -> System.out.println(e.getAllSelectedItems()));
MultipleSelect<String> multipleSelect = new MultipleSelect<>("Jose", "Manolo", "Pedro", "Luis");
multipleSelect.select("Jose", "Manolo", "Pedro", "Luis");
multipleSelect.setDisplayAllSelected(true);

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Change to vaadin-core dependency

Released
2020-12-03
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 18
Vaadin 17 in 2.2.1
Vaadin 14 in 1.1.1
Browser
N/A

Multiple Select - Vaadin Add-on Directory

An extended version of Vaadin Select supporting multiple-items selection. Multiple Select - Vaadin Add-on Directory
This component is an extended version of Vaadin Select supporting multiple-items selection. It is the Vaadin 14 Java integration of @vaadin-component-factory/vcf-multi-select. ## Install To use the component in an application using maven, add the following dependency to your pom.xml: ``` com.vaadin.componentfactory multiple-select ${component.version} ``` ## Usage The component is intended to be used in the same way as Vaadin Select. For example, ``` MultipleSelect labelSelect = new MultipleSelect<>(); labelSelect.setItems("Option one", "Option two"); labelSelect.setLabel("Label"); MultipleSelect placeholderSelect = new MultipleSelect<>(); placeholderSelect.setItems("Option one", "Option two"); placeholderSelect.setPlaceholder("Placeholder"); MultipleSelect valueSelect = new MultipleSelect<>(); valueSelect.setItems("Value", "Option one", "Option two"); valueSelect.setValue("Value"); add(labelSelect, placeholderSelect, valueSelect); ``` ## Limitations The component is not working with Vaadin 14 in compatiblity mode.
View on GitHub

Multiple Select version 1.0.0

Multiple Select version 1.0.1

Multiple Select version 2.0.0

Multiple Select version 2.0.1

Multiple Select version 2.1.0
Add API enabling setting the text shown next to extra items count

Multiple Select version 2.1.1

Multiple Select version 2.2.0
By default, only the first selected value is displayed in the field, with the number of additionally selected values (N) is indicated as "(+N other(s))". This version adds the possibility of changing this behavior by setting the displayAllSelected property to true, in which case all selected items will be displayed, comma-separated, with ellipsis if more items are present than fits the component.

Multiple Select version 1.1.0
By default, only the first selected value is displayed in the field, with the number of additionally selected values (N) is indicated as "(+N other(s))". This release adds the possibility of changing this behavior by setting the displayAllSelected property to true, in which case all selected items will be displayed, comma-separated, with ellipsis if more items are present than fits the component.

Multiple Select version 1.1.1
Change to vaadin-core dependency

Multiple Select version 2.2.1

Multiple Select version 3.0.0
Bump supported Vaadin version to 18, and implement HasHelper

Multiple Select version 3.0.1
Change to vaadin-core dependency

Online