react-select does not scroll into view selected option
See original GitHub issueI expect that the following will result in the selected option being shown as soon as the dropdown is opened. It does not. It highlights the selected option but you have to scroll to it in order to see it.
<Select
options={[...Array(121).keys()].map(num => {return {value: num, label: num}})}
value={{label: 20, value: 20}}
isOptionSelected={(option) => (option.value == 20) ? true : false}
/>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:6 (2 by maintainers)
Top Results From Across the Web
React-select scrollintoView does not scroll the selected value
So I was able to solve this using onMenuOpen() call back function with timeOut as we do not have "MyDropdown__option--is-selected" class at the ......
Read more >React-select scrollintoView does not scroll the selected value ...
Coding example for the question React-select scrollintoView does not scroll the selected value-Reactjs.
Read more >API - React Select
This is useful when you have a scrollable modal and want to portal the menu out, but want to avoid graphical issues.
Read more >Material Select not scrolling to selected value in long drop
Expected behavior When there are a large number of options in the dropdown and the items are in a scrollable list, it doesn't...
Read more >Element.scrollIntoView() - Web APIs | MDN
Corresponds to scrollIntoViewOptions: {block: "start", inline: "nearest"} . This is the default value. If false , the bottom of the element will ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can use a custom component.
Issue still exist