I have a form, where I need to set the default value of the select dropdown in formik.
SelectDropDown.js
{props.options.map((option) => {
return (
<option key={option.id} value={option.id} title={option.title}>
{option.name}
</option>
);
})}
App.js
<SelectDropdown
control="select"
name="episodeType"
data-testid="episodeType"
id="episodeType"
label="Episode Type"
options={dropDownValues} // how to pass defualt a props
/>
How to pass the default values as props so the page is loaded the values is selected.
Thank you.