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 would like to set a default option when the menu opens. Meaning, I don't want the value set or selected, I simply want the menu to scroll to a specific option when initially opened. (ie: option list of 100 years, but I want to menu to open to 2023 without actually selecting it (firing the onChange event).
I have done ref.current.setValue() and ref.current.selectOption() when the Select onFocus fires, but those actually set the value and fire "onChange" (which again, I don't want to happen).
Apologies if I've missed something simple. Any help/thoughts?
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
-
I would like to set a default option when the menu opens. Meaning, I don't want the value set or selected, I simply want the menu to scroll to a specific option when initially opened. (ie: option list of 100 years, but I want to menu to open to 2023 without actually selecting it (firing the onChange event).
I have done
ref.current.setValue()
andref.current.selectOption()
when the Select onFocus fires, but those actually set the value and fire "onChange" (which again, I don't want to happen).Apologies if I've missed something simple. Any help/thoughts?
Beta Was this translation helpful? Give feedback.
All reactions