Skip to content

MultiSelectComboBox overlay is loading infinitely #8235

@jcgueriaud1

Description

@jcgueriaud1

Description

When I selecting an item in the multiselect combobox with a lazy dataprovider and navigate to another field before the overlay is refreshed then the overlay is in "loading" mode until I update the filter.

Expected outcome

The loading mode should load the data.

Minimal reproducible example

package com.example.examplefeature.ui;

import com.example.base.ui.component.ViewToolbar;

import com.vaadin.flow.component.combobox.MultiSelectComboBox;
import com.vaadin.flow.component.html.Main;
import com.vaadin.flow.data.provider.DataProvider;
import com.vaadin.flow.router.Menu;
import com.vaadin.flow.router.PageTitle;
import com.vaadin.flow.router.Route;

import java.util.stream.IntStream;

@Route("multiselect-demo")
@PageTitle("MultiSelect Demo")
@Menu(order = 1, icon = "vaadin:list-select", title = "MultiSelect Demo")
class MultiSelectDemoView extends Main {

    MultiSelectDemoView() {
        setSizeFull();

        // Create MultiSelectComboBox with lazy DataProvider for 1000 string items
        var combo = new MultiSelectComboBox<String>("Select items");
        combo.setPlaceholder("Type to filter 1,000 items");

        combo.setItems(DataProvider.fromFilteringCallbacks(
                query -> {
                    int offset = query.getOffset();
                    int limit = query.getLimit();
                    int end = Math.min(offset + limit, 1000);
                    return IntStream.range(offset, end)
                            .mapToObj(i -> "Item " + (i + 1));
                },
                query -> 1000
        ));
        combo.setWidth("24em");

        add(new ViewToolbar("MultiSelect Demo"));
        add(combo);
    }
}

Steps to reproduce

  • Go in the multiselect combobox
  • Filter "Item"
  • Select any element with key Enter
  • press TAB when the overlay is still loading
  • go back to the field
  • press key down to open the overlay
Screen.Recording.2025-11-04.at.13.16.31.mov

Environment

Vaadin version(s): 24.9.4

Browsers

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions