Opening Pulldown-Menu in ComboBox

Hi,

can I somehow open the pulldown-menu in the ComboBox instantly? Typically the pulldown-menu is opened only, when the user types a first letter. I want to open it when the user clicks in the textfield or present the Combobox already opened.

Hi,

Looking at the ComboBox API, it doesn’t seem to allow opening the dropdown from the server side. If it would, you could’ve attached a FocusListener to it and open the dropdown when that event occurs.

You can file a
new enhancement ticket
about the missing API if you wish.

As a workaround, you can create in Extension for ComboBox that provides the same functionality. See
Creating a component extension

Thanks for the answer. I think I will create a Component-Extension.

Hi, please I need you help me to know how I can avoid that the Menu in ComboBox not to be static when scroll the page, please how I can make that the menu follows the ComboBox. many thanks.

That’s a bit tricky to do, since the drop down element is completely separate from the input/button elements, living inside the overlays-container element (Vaadin 7).

To make it follow the scroll, you’d need to place the drop down element inside the actual root element of the combo box (.v-filterselect).

Another option is to make a small extension that polls the scroll position of the .v-view element when the drop down is open and updates the drop down position accordingly. See my previous post for a link to the tutorial.