Skip to content

ComboBox- problem with items overlay when combo is removed and added to UI again #1807

Closed

Description

@darmro

Description

I have a "wizard" with few steps. Each step is a separate div/layout with a step content. The wizard has its own div/layout content. Only one step is shown in the wizard at once. It's done by removing all components from wizard content and adding a current step content, ie. clicking "next" will remove from wizard content the content of the current step, and will add to wizard content the content of the next step, etc.
In one such step, there is a ComboBox with items (taken from DataProvider).

The case when it doesn't work:
The user sees a step with a combo. The user doesn't click on combo to expand the items list but clicks next. Then prev (to see the previous step with combo) and then clicks in combo to expand items list. But no items are shown!
2

The case when it works as expected:
The user sees a step with a combo. The user at first clicks on combo to expand the items list, the list expands. Then the user clicks next and prev and then clicks in combo again. The list of items is shown correctly.
1

The same code, the same use case (dynamically removing and adding to UI components and combo).

Minimal reproducible example

test-combo.zip

Environment

Vaadin flow (java only) ver. 20
Java 8

BTW:
I know that when the components (steps content) are not removed from UI and added again, but only hidden and shown with setVisible(..) everything works fine. It can be used as a workaround. But it's really strange that when components are removed and added it works only when the combo is expanded before being removed. When it's not expanded it doesn't work anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions