JedWatson / JedWatson/react-select

Select options not click() selectable from within DOM

Open
#5,628 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

issue/bug-unconfirmed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

I need to automate form data input, but I'm having issues finding a way to select an option with a react-select component. Browser extensions are not able to access react properties due to security sandboxing. As such only in dev tools can I use select->control->reactProps->...->setvalue().

Is it possible to fix the react-select bug that prevents e.click() from opening the drop-down list and then selecting one of the options also using e.click()?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with a react-select component and a browser extension that invokes e.click() on the control and an option. Compare that behavior with the dev-tools reactProps setValue workaround described in the report. Done means the dropdown opens and an option can be selected through clicks without accessing React internals.

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
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.