You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I bumped into the issue about focusing selected item. It doesn't work in my scenario because items in options can be recalculated from time to time so they loose reference to them.
As I can see react-select uses indexOf(selectValue[0]) a lot to determine next focus index. So it returns -1 in my case because reference to options changes.
Shouldn't it look for options using values instead? This way it will keep working even after reference was changed, e.g it could look like:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I bumped into the issue about focusing selected item. It doesn't work in my scenario because items in options can be recalculated from time to time so they loose reference to them.
As I can see react-select uses
indexOf(selectValue[0])
a lot to determine next focus index. So it returns -1 in my case because reference to options changes.Shouldn't it look for options using values instead? This way it will keep working even after reference was changed, e.g it could look like:
What do you think?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions