mousemke / flounder

Style-able dropdown replacement for native dropdowns
MIT License
9 stars 10 forks source link

[Events] On open selected option should always be visible #157

Closed conor-cafferkey-sociomantic closed 6 years ago

conor-cafferkey-sociomantic commented 7 years ago

Currently

Consider a Flounder with a long list of options that must be scrolled. When we open the dropdown the scroll position is either at the top of the list (if we have not interacted with it) or wherever we last left off.

Problem

This means the currently selected option is not always in view.

Wanted

Native behavior (to be verified): dropdown always opens with selected option in view.

mousemke commented 7 years ago

relavent https://github.com/sociomantic-tsunami/flounder/blob/master/src/core/utils.js#L323-L346