vaadin / vaadin-combo-box-flow

Vaadin Flow Java API for vaadin/vaadin-combo-box Web Component
https://vaadin.com/components/vaadin-combo-box
Other
5 stars 9 forks source link

Override combobox _isItemSelected to highlight remapped selected item #307

Closed tomivirkki closed 5 years ago

tomivirkki commented 5 years ago

Fixes #304

This commit removes that hack with dynamically updating the Web Component's value / selectedItem.key after item remap which turned out to be problematic. The new approach overrides the _isItemSelected logic to also consider item remapping when highlighting selection.

By remapping I mean what happens when you scroll away from the currently selected item so that the range which included the selected item gets discarded and later returning to that range so that the selected item is represented by a new object instance with new key.


This change is Reviewable