Directory

← Back

ChipField Addon

Vaadin Flow integration of Paper Chip as a Field

Author

Rating

Popularity

100+

This is a Vaadin Flow wrapper built based on this excellent component implementation..

Provides a simple API for using it as an alternative multi-select field, with some features like restricting the allowed characters from the server side.

It also allows using it with Binder.

Sample code

	ChipField<String> chf = new ChipField<>("Select some planets", "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune");
	Button b = new Button("Obtain selected planets");
	b.addClickListener(event->Notification.show("Planets: " + chf.getValue().stream().collect(Collectors.joining(",")));
    ChipField<String> chf5 = new ChipField<>("Choose planet features (Binder demo, try with: 'Rings', 'Moons', 'Water', etc.)");
    chf5.setWidth("500px");
    chf5.setItems(Arrays.asList("Rings", "Moons", "Water", "Rocks", "Lava", "Ice", "Cold", "Heat", "Atmosphere"));
    Binder<Planet> binder = new Binder<>();
    binder.bind(chf5,Planet::getConfiguration,Planet::setConfiguration);
    binder.setBean(p);

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

Bug fixes:

  • fix: update chips label when itemLabelGenerator is updated (#31)
Released
2023-04-10
Maturity
TESTED
License
Apache License 2.0

Compatibility

Framework
Vaadin 14
Vaadin 22
Vaadin 23
Vaadin 24
Vaadin 13 in 1.0.0
Vaadin 12 in 1.0.0
Vaadin 11 in 1.0.0
Vaadin 10 in 1.0.0
Vaadin 14+ in 2.0.0
Browser
Firefox
Safari
Google Chrome
iOS Browser
Android Browser
Internet Explorer

ChipField Addon - Vaadin Add-on Directory

Vaadin Flow integration of Paper Chip as a Field ChipField Addon - Vaadin Add-on Directory
This is a Vaadin Flow wrapper built based on [this excellent component implementation.](https://github.com/ThomasCybulski/paper-chip). Provides a simple API for using it as an alternative multi-select field, with some features like restricting the allowed characters from the server side. It also allows using it with Binder.
Issue tracker
View on GitHub
Source Code
Author Homepage
Online Demo

ChipField Addon version 1.0.0
Initial release

ChipField Addon version 2.0.0
Initial release with Vaadin 14+ NPM support

ChipField Addon version 2.0.1
* Remove flow-build-info.json from compiled JAR * Replace vaadin dependency with vaadin-core

ChipField Addon version 2.1.0
Added support for extending `com.flowingcode.vaadin.addons.chipfield.Chip`. Solves [#8](https://github.com/FlowingCode/ChipFieldAddon/issues/8)

ChipField Addon version 2.2.0
Add click event listener ([#7](https://github.com/FlowingCode/ChipFieldAddon/issues/7))

ChipField Addon version 2.3.0
### Features: * Retrieve item object from chip events ([#26](https://github.com/FlowingCode/ChipFieldAddon/issues/26)). * Add ChipEvent as superclass of removed, created and clicked events. ### Bugfixes * Keep model and presentation values in sync ([#25](https://github.com/FlowingCode/ChipFieldAddon/issues/25) [#27](https://github.com/FlowingCode/ChipFieldAddon/issues/27)). * Correct the behavior of `setValue` and `removeSelectedItem`.

ChipField Addon version 2.4.0
### Bugfixes * Call setPresentationValue in onAttach method ([#33](https://github.com/FlowingCode/ChipFieldAddon/issues/33)) * Track additional items that were not returned by findItemByLabel ([#35](https://github.com/FlowingCode/ChipFieldAddon/issues/35)) * Support adding additional items through setValue ([#36](https://github.com/FlowingCode/ChipFieldAddon/issues/36)) - If additional items are allowed, non-existing items are always tracked as additional items. - If additional items are not allowed, then setPresentationValue sanitizes the input by ignoring such items. * Restore presentation value on exception case ([#45](https://github.com/FlowingCode/ChipFieldAddon/issues/45)) * Fire created/removed events when the value changes (#48, #49): fix that the events are not fired when the value is modified from server side, and the item is not available from the removed listener when the removal originates from the client. ### Other changes * Deprecate duplicated methods

ChipField Addon version 2.4.1
### Bugfixes: * Skip loading Roboto font ([#4](https://github.com/FlowingCode/ChipFieldAddon/issues/4)) ### Other changes: * Update vaadin version to 14.6.2

ChipField Addon version 2.4.2
### Bugfixes * Fix component style for readonly mode ([#40](https://github.com/FlowingCode/ChipFieldAddon/issues/40))

ChipField Addon version 2.5.0
#### Features: * Add theme support ([#55](https://github.com/FlowingCode/ChipFieldAddon/issues/55)).

ChipField Addon version 2.6.0
#### New Features: * Allow selection by Enter key press when no newItemHandler is configured ([#37](https://github.com/FlowingCode/ChipFieldAddon/issues/37))

ChipField Addon version 2.6.1
#### Bug fixes: * fix: update chips label when itemLabelGenerator is updated ([#31](https://github.com/FlowingCode/ChipFieldAddon/issues/31))

Online