I am using react-select3.2.0. When I open my select box and select a option. And then I open my select dropdown again then selected value comes into view. But the problem comes when value of the dropdown comes from the props and not manually selected by opening dropdown. Then when I open the drop down it does not scroll into view the selected value. I have also tried menuScrollIntoView={true} props of react-select but my problem persists. My Select component is as follow;
import Select from "react-select";
.
.
.
<Select
options={props.options}
// isLoading={props.options ? true: false}
onMenuOpen={onOpen}
value={props.defaultOption}
onChange={(event: any) => props.onSelect(event)}
className ={"MyDropdown"}
classNamePrefix={"MyDropdown"}
// menuShouldScrollIntoView={true}
isDisabled={props.isDisabled}
isSearchable={props.isSearchable}
>
</Select>