JedWatson / JedWatson/react-select
AsyncSelect: Menu is not automatically positioned when using `menuPlacement="auto" menuIsOpen={true}`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
When async select component is close to bottom of the screen it doesn't seem to automatically place the menu above the input when menuPlacement="auto" and menuIsOpen={true}:
<AsyncSelect
cacheOptions
loadOptions={loadOptions}
defaultOptions
onInputChange={this.handleInputChange}
menuPlacement="auto"
menuIsOpen={true}
/>
When menuIsOpen={true} is not set and the menu is opened on click - everything works fine.
Sandbox: https://codesandbox.io/s/codesandboxer-example-forked-8k2ku?file=/example.tsx
https://user-images.githubusercontent.com/745532/144063651-83849a49-bedb-418a-a050-f8c23cd79c5f.mov
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox and compare AsyncSelect's controlled-open path with the working click-open behavior, focusing on menuPlacement="auto". Reproduce the issue with the menu near the bottom of the screen; done means the open menu is automatically positioned above the input when menuIsOpen={true}.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100