{"id":17227580,"url":"https://github.com/gatanaso/multiselect-combo-box-flow","last_synced_at":"2025-04-14T01:22:56.699Z","repository":{"id":35638870,"uuid":"166518418","full_name":"gatanaso/multiselect-combo-box-flow","owner":"gatanaso","description":"Multi-select-combo-box component for Vaadin","archived":false,"fork":false,"pushed_at":"2022-02-13T10:47:12.000Z","size":166,"stargazers_count":30,"open_issues_count":23,"forks_count":24,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-27T15:21:30.728Z","etag":null,"topics":["java","vaadin","vaadin-flow","vaadin-platform"],"latest_commit_sha":null,"homepage":"https://multiselect-combo-box-flow.herokuapp.com/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gatanaso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-19T07:19:25.000Z","updated_at":"2023-11-16T01:07:10.000Z","dependencies_parsed_at":"2022-08-08T10:01:09.441Z","dependency_job_id":null,"html_url":"https://github.com/gatanaso/multiselect-combo-box-flow","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gatanaso%2Fmultiselect-combo-box-flow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gatanaso%2Fmultiselect-combo-box-flow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gatanaso%2Fmultiselect-combo-box-flow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gatanaso%2Fmultiselect-combo-box-flow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gatanaso","download_url":"https://codeload.github.com/gatanaso/multiselect-combo-box-flow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248805456,"owners_count":21164334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","vaadin","vaadin-flow","vaadin-platform"],"created_at":"2024-10-15T04:19:49.720Z","updated_at":"2025-04-14T01:22:56.672Z","avatar_url":"https://github.com/gatanaso.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Published on Vaadin  Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/multiselect-combo-box)\n[![Build Status](https://travis-ci.org/gatanaso/multiselect-combo-box-flow.svg?branch=master)](https://travis-ci.org/gatanaso/multiselect-combo-box-flow)\n[![Version on Vaadin Directory](http://img.shields.io/vaadin-directory/version/multiselect-combo-box.svg)](https://vaadin.com/directory/component/multiselect-combo-box)\n[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/multiselect-combo-box.svg)](https://vaadin.com/directory/component/multiselect-combo-box)\n\n# MultiselectComboBox\nA multi select combo box component for Vaadin Flow.\n\nIntegration of of the [multiselect-combo-box](https://github.com/gatanaso/multiselect-combo-box) web component.\n\n#### [Live Demo ↗](https://multiselect-combo-box-flow.herokuapp.com/)\n\n## Install\n\nAdd the `multiselect-combo-box-flow dependency` to your `pom.xml`:\n```xml\n\u003cdependency\u003e\n   \u003cgroupId\u003eorg.vaadin.gatanaso\u003c/groupId\u003e\n   \u003cartifactId\u003emultiselect-combo-box-flow\u003c/artifactId\u003e\n   \u003cversion\u003e4.0.0-rc2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nAdd the `vaadin-addons` repository:\n```xml\n\u003crepository\u003e\n   \u003cid\u003evaadin-addons\u003c/id\u003e\n   \u003curl\u003ehttp://maven.vaadin.com/vaadin-addons\u003c/url\u003e\n\u003c/repository\u003e\n```\n\n## Basic Usage\n\nCreate a `MultiselectComboBox` and add items\n```java\nMultiselectComboBox\u003cString\u003e multiselectComboBox = new MultiselectComboBox();\n\nmultiselectComboBox.setLabel(\"Select items\");\n\nmultiselectComboBox.setItems(\"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\");\n```\n\nAdd a value change listener (invoked when the selected items/value is changed):\n```java\nmultiselectComboBox.addValueChangeListener(event -\u003e {\n    // handle value change\n});\n```\n\nGet the selected items/value:\n```java\n// set of selected values, or an empty set if none selected\nSet\u003cString\u003e value = multiselectComboBox.getValue();\n```\n\n`MultiselectComboBox` also implements the [MultiSelect](https://vaadin.com/api/platform/12.0.3/com/vaadin/flow/data/selection/MultiSelect.html) interface, \nwhich makes it easy to listen for selection changes: \n```java\nmultiselectComboBox.addSelectionListener(event -\u003e {\n   event.getAddedSelection(); // get added items\n   event.getRemovedSelection() // get removed items\n});\n```\n\n## Object items\n\nThe `MultiselectComboBox` supports object items. Given the following `User` class:\n```java\nclass User {\n    private String name;\n    private String username;\n    private String email;\n\n    public User(String name, String username, String email) {\n        this.username = username;\n        this.email = email;\n    }\n\n    // getters and setters intentionally omitted for brevity\n\n    @Override\n    public String toString() {\n        return name;\n    }\n}\n```\n\nCreate a `MultiselectComboBox` of `User`s:\n```java\nMultiselectComboBox\u003cUser\u003e multiselectComboBox = new MultiselectComboBox();\n    \nmultiselectComboBox.setLabel(\"Select users\");\n    \nList\u003cUser\u003e users = Arrays.asList(\n    new User(\"Leanne Graham\",\"leanne\",\"leanne@demo.dev\"),\n    new User(\"Ervin Howell\",\"ervin\",\"ervin@demo.dev\"),\n    new User(\"Samantha Doe\",\"samantha\",\"samantha@demo.dev\")\n);\n\n// by default uses `User.toString()` to generate item labels\nmultiselectComboBox.setItems(users);\n```\n\nThe `MultiselectComboBox` uses the `toString()` method to generate the item labels by default. \nThis can be overridden by setting an item label generator:\n```java\n// use the user email as an item label\nmultiselectComboBox.setItemLabelGenerator(User::getEmail)\n```\n\n## Version information\n* 4.x.x - the version for Vaadin 22+\n* 3.x.x - the version for Vaadin 16 and Vaadin 15\n* 2.x.x - the version for Vaadin 14 (LTS)\n* 1.x.x. - the version for Vaadin 13 and Vaadin 12\n\n## Branch information\n* `master` the latest version for Vaadin 22+\n* `V14` the version for Vaadin 14 (LTS)\n\n## Web Component\nThe `\u003cmultiselect-combo-box\u003e` web component is available on [npm](https://www.npmjs.com/package/multiselect-combo-box), \nthe [Vaadin Directory](https://vaadin.com/directory/component/gatanasomultiselect-combo-box) and [GitHub](https://github.com/gatanaso/multiselect-combo-box).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgatanaso%2Fmultiselect-combo-box-flow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgatanaso%2Fmultiselect-combo-box-flow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgatanaso%2Fmultiselect-combo-box-flow/lists"}