zetkin / organize.zetk.in

Organizer front-end of the Zetkin system for organizing activism
21 stars 14 forks source link

WIP: Add scrollListToSelectedIndex to RelSelectInput #1242

Closed olleolleolle closed 3 years ago

olleolleolle commented 3 years ago

This PR is the exploration @oelrich and I did on the RelSelectInput component, which needs a "memory" of the last selected option, to be "in viewport" when the options are re-shown.

Background

This new state is meant to make it possible to modify scrollTop of the listDOMNode - the UL element - when a selection has been made, previously, and the user is re-opening the "selectable options" list. It doesn't do that!

Problems, questions

richardolsson commented 3 years ago

Great work on this! @niklasva82 ended up implementing the same thing using a slightly different approach in #1275.