[autocomplete] Add equivalent to openOnFocus for `click` events
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Summary 💡
openOnFocus does not affect what happens when an out-of-focus input is clicked. In the comments of #20286, it was argued that this is by design. As such, I hereby request an equivalent (suggested: disableOpenOnClick) prop that disables opening the suggestions on click.
Motivation 🔦
I had to add this to the embedded TextField
[...]
onMouseDownCapture={ (e) => e.stopPropagation()}
[...]
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 by reviewing the Autocomplete component's handling of focus and click events, then read the discussion in issue #20286 and this issue's 24 comments for the intended behavior. Done means a supported option provides the requested distinction between opening on focus and opening on click, with the relevant behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100