Autodesk / Autodesk/hig

TextField 'focused' property not working

Open
#1,231 0 comments 0 reactions 0 assignees View on GitHub
bug community
Dominant language
JavaScript
Stars
193
Forks
112
PR merge metrics
No merged PRs in 30d

Description

https://codesandbox.io/s/kkml3y7q27

Using the TextField component with the `focused` property does not fulfill the expectations: having the Input field focused.

The `autoFocus` property works because is passing all the way through the components directly to the Input field.

The expected behavior is to pass the `focused={true}` property (which by default is false), and the result would be the Input field focused at render.

Contributor guide

Open the contributing guide

Research direction

Start with the TextField component and the linked CodeSandbox reproduction, then trace how the `focused` and `autoFocus` properties reach the Input field. Verify the behavior in the reproduction and existing test setup; done means `focused={true}` leaves the Input focused at render while the default remains false.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.