Skip to content

CustomValueSetEvent is not fired when committing value before items are loaded #7126

Open
@mstahv

Description

@mstahv

Description

If one sets ComboBox to autoOpen=false mode a customvaluesetevent is not fired, unless the popup is manually opened.

Expected outcome

Event should be fired like it is in the default mode.

Minimal reproducible example

    class PersonSelect extends ComboBox<Person> {
        {
            setItemLabelGenerator(Person::name);
            setAllowCustomValue(true);
            setAutoOpen(false);
            addCustomValueSetListener(e -> {
                Notification.show("Custom value set: " + e.getDetail());
            });

        }
    }

Steps to reproduce

Use the code above, type a new person and hit tab/enter.

Environment

Hilla: 24.6.5
Flow: 24.6.5
Vaadin: 24.6.5
Spring Boot: 3.4.2
Spring: 6.2.2
Copilot: 24.6.5
Frontend Hotswap: Disabled, using pre-built bundle
OS: aarch64 Mac OS X 15.3.1
Java: Eclipse Adoptium 22.0.1
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15
Java Hotswap: JRebel is in use
IDE Plugin: 1.4.6 IntelliJ

Browsers

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions