I am attempting to render defaultValues in a react-select component.
var initValue = ['Chocolate', 'Strawberry', 'Vanilla];
The react-select components display with the correct default value. However, my Yup validation doesn't recognize the default value (see image below) as a valid selection.
Therefore the form will not submit, although the fields are filled in. Can someone advise how I can make my Yup validator recognize the defaultValue? Please see working code version in my github repo, which demonstrates this issue.
You should use value instead of defaultValue.