vaadin / framework

Vaadin 6, 7, 8 is a Java framework for modern Java web applications.
http://vaadin.com/
Other
1.77k stars 729 forks source link

Combobox dropdown always marks the first item as selected #12557

Closed rkovarik closed 1 year ago

rkovarik commented 1 year ago

Workaround: A] Educate users to not use ENTER to close the dropdown. B] comboBox.setScrollToSelectedItem(true); Be aware:

This requires finding the index of the item, which can be expensive in many large lazy loading containers.

TatuLund commented 1 year ago

Yes, this is a known behavior of Vaadin 8's ComboBox. I agree it is not the best possible. Thus when we rewrote ComboBox in our newer generation framework, we changed the behavior. Interesting thing was that some of our customers who have migrated from Vaadin 8 to Vaadin 14 or later, wanted to retain this behavior, so we have made add-on for our newer framework version, that has this Vaadin 8 behavior retained.

https://vaadin.com/directory/component/combo-box-with-vaadin-8-behavior

This raises the question, that if we would decide to "fix" this, or change this. Should we do it so that we introduce API that allows the select the behavior.

Note: Vaadin 8.16 is distributed under commercial license. Vaadin 8.14.3 was the last one released under Apache 2 terms. If you have commercial license from Vaadin, you can open request about this issue at https://support.vaadin.com/

rkovarik commented 1 year ago

Thx @TatuLund for the explanation,

we will try the workaround. If needed, we will open a support request.

Roman