Hello Goran!
I am using your great component version 2.0.0.rc2 with vaadin 14.
I works perfectly in view extending Vertical Layout in my project.
But using it in a Popup-Dialog the check symbol in the dropdown for selected items is missing. (see attachment)
A normal ComboBox shows the check symbol in the dropdown for selected items.
Here the code:
public class ConditionDialog extends Dialog {
@Autowired
public ConditionDialog(...) {
ComboBox<String> comboBox = new ComboBox<>("Browsers");
comboBox.setItems("Google Chrome", "Mozilla Firefox", "Opera",
"Apple Safari", "Microsoft Edge");
addSimpleStringDemo();
add(comboBox);
open();
}
private void addSimpleStringDemo() {
MultiselectComboBox<String> multiselectComboBox = new MultiselectComboBox();
multiselectComboBox.setLabel("Multiselect combo box with string items");
multiselectComboBox.setPlaceholder("Add");
multiselectComboBox.setItems("Item 1", "Item 2", "Item 3", "Item 4");
multiselectComboBox.addSelectionListener(event -> Notification.show(event.toString()));
Button getValueBtn = new Button("Get value");
getValueBtn.addClickListener(event -> multiselectComboBoxValueChangeHandler(multiselectComboBox));
final FormLayout content = new FormLayout();
content.add(multiselectComboBox);
VerticalLayout layout = new VerticalLayout();
layout.add(content);
add(layout);
}
private void multiselectComboBoxValueChangeHandler(MultiselectComboBox<String> multiselectComboBox) {
Set<String> selectedItems = multiselectComboBox.getValue();
String value = selectedItems.stream().collect(Collectors.joining(", "));
Notification.show("Items value: " + value);
}
}
Something by using your component in a pop-up dialog will cause this error. Do you have any idea ?
Thank you very much,
André