Vaadin MultiselectComboBox becomes empty after I select item and click outside of the component

160 Views Asked by At

I have created a simple MultiselectComboBox component from 'org.vaadin.gatanaso' package and it has 5 String items. Two of these items are single characters. If I type one of these single characters and then select it, everything looks good but after clicking anywhere the item disappears. I record the bug and upload the video on youtube https://youtu.be/c8c84dfSWms . After that, I figure out, the bug is not about selecting a single character after typing it. The bug occurs if I type the full name of any item and then select it by clicking, the bug will occur whenever I click anywhere.

My code is:

private MultiselectComboBox<String> createTestSelectBox(){
        MultiselectComboBox<String> multiselectComboBox = new MultiselectComboBox<>("test");
        multiselectComboBox.setAllowCustomValues(true);
        ArrayList<String> items = new ArrayList<>();

        items.add("1");
        items.add("1k");
        items.add("k");
        items.add("klm 1");
        items.add("ku");

        multiselectComboBox.setItems(items);

        return multiselectComboBox;
    }

Steps to reproduce

  1. Click multi-select combobox and type the full name of any item from the list.
  2. Select the item which is filtered by your typing. You need to select with mouse clicking, not pushing enter button on the keyboard.
  3. Click anywhere except the combobox.

Environment

Vaadin version(s): 14.8.20

OS: macOS 13.3.1

Browser: Microsoft Edge latest version

0

There are 0 best solutions below