alsoscotland / react-super-select

MIT License
95 stars 33 forks source link

Feature wish for not focusing to the last selected entry. #159

Closed kuemme01 closed 6 years ago

kuemme01 commented 6 years ago

hi Guys, I use react-super-select as multiselect and find it annoying that the dropdown list always tries to center the last selected entry. I have already found the source for this behavior. It happens in the componentDidUpdate method where this._focusCurrentFocusedId(); is called. Could you control this call via a Boolean, which you could pass the <ReactSuperSelect /> component. Something like <ReactSuperSelect focusToSelectedValue = {false} /> that would be great. Is something like this planned for the future or could it be taken over as a feature? I already read a couple of forum posts of people who also struggle with that behavior and wish for a possibility to configure.

I currently use the version react-super-select 1.0.8

Will be happy for an answer.

kuemme01 commented 6 years ago

I recently create a pull request for you guy's that would enable that feature. Please have a look if it's not in conflict with your project in general.

react-super-select/pull/160

alsoscotland commented 6 years ago

@kuemme01 Thanks again. Give https://github.com/alsoscotland/react-super-select/tree/v1.0.19 a try

alsoscotland commented 6 years ago

@kuemme01 just wanted to check once more if this worked for you. Thanks

kuemme01 commented 6 years ago

Yes! We already implemented it on dev stage. Worked fine now! Again thank you for your fast support.

alsoscotland commented 6 years ago

@kuemme01 Thanks for getting back to me. No problem. Glad you like the control