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
Is there any way to pass in the value as a string instead of the object of my option? My option looks like this: ['am', 'pm']. I set the string value in my state and update the Select value with the string. However, it now shows that nothing is selected because the value is expecting an object like {label: 'am', value: 'am'}.
Any way I can avoid this issue and just pass in a string as the value?
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
-
Is there any way to pass in the value as a string instead of the object of my option? My option looks like this:
['am', 'pm']
. I set the string value in my state and update the Select value with the string. However, it now shows that nothing is selected because the value is expecting an object like{label: 'am', value: 'am'}
.Any way I can avoid this issue and just pass in a string as the value?
Beta Was this translation helpful? Give feedback.
All reactions