JedWatson / JedWatson/react-select

onFocus and onBlur issue

Open
#5,903 0 comments 0 reactions 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

Im trying to use CreatableSelect in a table
one of my column im using this creatableSelect where i can edit letter wise of the word selected from dropdown
im facing a issue when i focus the input dropdown there will be a -ValueContainer className div and inside this a div with input as its child
so,
div className="css-1fdsijx-ValueContainer"
div className"#dynamically generated" data-value="MY NAME"
input /
/div
/div

this is the code on focus

div className="css-1fdsijx-ValueContainer"
div className"#dynamically generated" data-value="MY NAME" /div
div className"#dynamically generated" data-value
input /
/div
/div

this is the code when blur or not on focus in the dom tree

so the issue is when i select something on change function is called and data is set but not visible on table as that extra div that apprears after manually blur is not present
only when i click outside or manually blur it i can see the data MY NAME on the table

can you please look into this issue and fix it

image image

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 at the CreatableSelect entry point and reproduce the table-editing case described in the issue, comparing the focused and blurred ValueContainer DOM. The work is done when a selected value is visible in the table immediately after onChange, without requiring a manual blur; add or update a regression test if the existing test structure identifies one.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.